build #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
workflow_dispatch: {} | |
env: | |
CARGO_INCREMENTAL: 0 | |
# removed: impl warning turns into error: RUSTFLAGS: "-Dwarnings" | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v1 | |
- name: Cache cargo registry | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} | |
- name: Cache cargo index | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo/git | |
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }} | |
- name: Cache cargo build | |
uses: actions/cache@v4 | |
with: | |
path: target | |
key: ${{ runner.os }}-rust-${{ matrix.toolchain }}-cargo-build-target-${{ hashFiles('Cargo.lock') }} | |
- name: Log in to google cloud | |
uses: 'google-github-actions/auth@v2' | |
with: | |
credentials_json: '${{ secrets.GOOGLE_CLOUD_CREDENTIALS }}' # Replace with the name of your GitHub Actions secret | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
- name: Install libudev-dev | |
run: sudo apt-get update && sudo apt-get install libudev-dev | |
- name: Build with fortanix and debian | |
run: | | |
cargo install cargo-deb | |
cargo build --features=softsign,fortanixdsm --release | |
cargo deb --profile release -- --features fortanixdsm,softsign | |
- name: Upload to google artifact registry | |
run: | | |
find . -name "*.deb" | |
gcloud artifacts apt upload tmkms --location=us-central1 --source=tmkms/tmkms/target/debian/tmkms_0.14.0-1_amd64.deb |