diff --git a/.github/workflows/binaries-build.yml b/.github/workflows/binaries-build.yml index ca3e299..b1e4fca 100644 --- a/.github/workflows/binaries-build.yml +++ b/.github/workflows/binaries-build.yml @@ -25,24 +25,27 @@ jobs: - aarch64-unknown-linux-gnu - x86_64-apple-darwin - x86_64-unknown-linux-gnu - # - x86_64-pc-windows-gnu + - x86_64-pc-windows-gnu - x86_64-pc-windows-msvc include: - build: aarch64-apple-darwin os: macos-latest - bin_name: madara + bin_name: gatling - build: aarch64-unknown-linux-gnu os: ubuntu-latest - bin_name: madara + bin_name: gatling - build: x86_64-apple-darwin os: macos-latest - bin_name: madara + bin_name: gatling - build: x86_64-unknown-linux-gnu os: ubuntu-latest - bin_name: madara + bin_name: gatling + - build: x86_64-pc-windows-gnu + os: windows-latest + bin_name: gatling.exe - build: x86_64-pc-windows-msvc os: windows-latest - bin_name: madara.exe + bin_name: gatling.exe runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -52,6 +55,15 @@ jobs: run: | rustup target add ${{ matrix.build }} + - name: Setup build deps (aarch64-unknown-linux-gnu) + if: matrix.build == 'aarch64-unknown-linux-gnu' + run: | + sudo apt update + sudo apt install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc + export CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc + export CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g+ + - name: Build binaries run: cargo build --release --target ${{ matrix.build }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7162b74 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM rust:slim-buster as builder + +WORKDIR /gatling + +COPY . . +RUN cargo build --release + +FROM debian:buster-slim +LABEL description="Gomu Gomu no Gatling" \ + authors="Oak " \ + source="https://github.com/keep-starknet-strange/gomu-gomu-no-gatling" + +COPY --from=builder /gatling/target/release/gatling /gatling-bin + +ENTRYPOINT ["/gatling-bin"]