From 0435e880e577579a96b6f230c49b0f0a9ba8b41b Mon Sep 17 00:00:00 2001 From: Sergio <77530549+sergi0g@users.noreply.github.com> Date: Tue, 9 Jul 2024 10:37:51 +0300 Subject: [PATCH] Create build.yml This will (hopefully) build Cup and cache the dependencies --- .github/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1fec137 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Build binaries + +on: + push: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + strategy: + matrix: + arch: + - x86_64-unknown-linux-musl + - aarch64-unkown-linux-musl + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up cache + uses: Mozilla-Actions/sccache-action@v0.0.5 + - name: Build + run: cross build --release --target ${{ matrix.arch }} + env: + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: cup-${{ matrix.arch }} + path: ./target/${{ matrix.arch }}/release/cup