Bump bpaf from 0.9.9 to 0.9.12 in the cargo group #120
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: Rust Build and Test | |
### https://github.com/harmless-tech/rust-github-actions | |
on: | |
push: | |
branches: [ main ] | |
paths: [ .github/workflows/build.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml, Cross.toml ] | |
pull_request: | |
branches: [ main ] | |
paths: [ .github/workflows/build.yml, keys/**, src/**, test/**, build.rs, Cargo.lock, Cargo.toml, Cross.toml ] | |
workflow_dispatch: | |
env: | |
bin-name: todo | |
feature-set: '' | |
CARGO_TERM_COLOR: always | |
jobs: | |
ink-cross: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: aarch64-unknown-linux-gnu | |
can-test: false | |
- target: aarch64-unknown-linux-musl | |
can-test: false | |
- target: armv7-unknown-linux-gnueabihf | |
can-test: false | |
- target: armv7-unknown-linux-musleabihf | |
can-test: false | |
- target: powerpc64le-unknown-linux-gnu | |
can-test: false | |
- target: riscv64gc-unknown-linux-gnu | |
can-test: false | |
- target: s390x-unknown-linux-gnu | |
can-test: false | |
- target: x86_64-unknown-linux-gnu | |
can-test: true | |
- target: x86_64-unknown-linux-musl | |
can-test: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.target }} | |
- name: Run tests | |
if: ${{ matrix.can-test }} | |
run: | | |
docker run --rm \ | |
--userns host --user $(id -u):$(id -g) \ | |
-v $HOME/.cargo/registry:/usr/local/cargo/registry \ | |
-v ./:/project \ | |
ghcr.io/cargo-prebuilt/ink-cross:stable-${{ matrix.target }} \ | |
test --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }} | |
- name: Build with ink cross | |
run: | | |
docker run --rm \ | |
--userns host --user $(id -u):$(id -g) \ | |
-v $HOME/.cargo/registry:/usr/local/cargo/registry \ | |
-v ./:/project \ | |
ghcr.io/cargo-prebuilt/ink-cross:stable-${{ matrix.target }} \ | |
auditable build --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }} | |
- name: Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target-${{ matrix.target }} | |
path: | | |
target/${{ matrix.target }}/debug/${{ env.bin-name }} | |
cross: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-unknown-freebsd | |
can-test: false | |
- target: x86_64-unknown-netbsd | |
can-test: false | |
- target: x86_64-unknown-illumos | |
can-test: false | |
- target: powerpc64-unknown-linux-gnu | |
can-test: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Rust and add target | |
run: | | |
rustup update | |
rustc --version | |
rustup target add ${{ matrix.target }} | |
- uses: cargo-prebuilt/cargo-prebuilt-action@v3 | |
with: | |
pkgs: cross | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.target }} | |
- name: Run tests | |
if: ${{ matrix.can-test }} | |
run: cross test --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }} | |
- name: Build | |
run: cross build --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }} | |
- name: Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target-${{ matrix.target }} | |
path: | | |
target/${{ matrix.target }}/debug/${{ env.bin-name }} | |
apple-darwin: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-apple-darwin | |
os: macos-13 | |
- target: aarch64-apple-darwin | |
os: macos-14 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Rust and add target | |
run: | | |
rustup update | |
rustc --version | |
rustup target add ${{ matrix.target }} | |
- uses: cargo-prebuilt/cargo-prebuilt-action@v3 | |
with: | |
pkgs: cargo-auditable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.target }} | |
- name: Run tests | |
run: cargo test --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }} | |
- name: Build | |
run: cargo auditable build --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }} | |
- name: Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target-${{ matrix.target }} | |
path: | | |
target/${{ matrix.target }}/debug/${{ env.bin-name }} | |
pc-windows-msvc: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-pc-windows-msvc | |
can-test: true | |
- target: aarch64-pc-windows-msvc | |
can-test: false | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Rust and add target | |
run: | | |
rustup update | |
rustc --version | |
rustup target add ${{ matrix.target }} | |
- uses: cargo-prebuilt/cargo-prebuilt-action@v3 | |
with: | |
pkgs: cargo-auditable | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.target }} | |
- name: Run tests | |
if: ${{ matrix.can-test }} | |
run: cargo test --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }} | |
- name: Build | |
run: cargo auditable build --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }} | |
- name: Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: target-${{ matrix.target }} | |
path: | | |
target/${{ matrix.target }}/debug/${{ env.bin-name }}.exe |