From b7e19130ae7749ac64c3165f037746437199bc2a Mon Sep 17 00:00:00 2001 From: Joshua Coles Date: Tue, 19 Mar 2024 14:34:35 +0000 Subject: [PATCH] Try add a build.yml --- .github/workflows/build.yml | 51 +++++++++++++++++++++++++++++++++++++ 1 file changed, 51 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..300285f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,51 @@ +name: Rust + +on: [push, pull_request] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Cache Cargo registry + uses: actions/cache@v3 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-registry- + + - name: Cache Cargo target + uses: actions/cache@v3 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-build-target- + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + +# No tests for now +# - name: Build +# run: cargo build +# +# - name: Run tests +# run: cargo test + + - name: Build release binary + run: cargo build --release + + - name: Upload binary + uses: actions/upload-artifact@v3 + with: + name: binary + path: target/release/arc-ingester \ No newline at end of file