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