Skip to content

Commit

Permalink
CI: add test for unknown target
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Aug 2, 2022
1 parent 37d50cc commit 5edaf34
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,34 @@ jobs:
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

fallback:
name: "Build with fallback"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
id: actions-rs
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-fortanix-unknown-sgx
override: true
- name: Cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-fallback-${{ steps.actions-rs.outputs.rustc_hash }}-${{ hashFiles('Cargo.toml') }}
restore-keys: |
${{ runner.os }}-fallback-${{ steps.actions-rs.outputs.rustc_hash }}-
${{ runner.os }}-fallback-
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
# Should fail (outcome is negated):
- run: if cargo build --lib --target x86_64-fortanix-unknown-sgx; then exit 1; fi
# Should succeed:
- run: cargo build --lib --target x86_64-fortanix-unknown-sgx --features fallback

0 comments on commit 5edaf34

Please sign in to comment.