arc-ingester/.github/workflows/build.yml
2024-03-19 14:34:35 +00:00

51 lines
1.1 KiB
YAML

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