Skip to content

Commit

Permalink
chore: make hipcheck CI tests run on all supported arches
Browse files Browse the repository at this point in the history
Signed-off-by: jlanson <[email protected]>
  • Loading branch information
j-lanson committed Feb 5, 2025
1 parent 4c08647 commit a2a22dc
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/hipcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# macos-14 is ARM, macos-13 is x86
os: [ubuntu-20.04, windows-2019, macos-14, macos-13]
name: "Test (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
timeout-minutes: 15
Expand Down Expand Up @@ -74,7 +75,7 @@ jobs:
# Note that this actually runs "cargo check" and doesn't attempt
# to link the resulting artifacts together.
- name: Build
run: cargo check --verbose --workspace
run: cargo build --verbose --workspace

# Test the code.
- name: Test
Expand All @@ -87,3 +88,25 @@ jobs:
# Run our own checks for licensing and other info.
- name: Check
run: cargo xtask check

# Generate a GitHub API Token for doing Hipcheck runs
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.HIPCHECK_CI_APP_ID }}
private-key: ${{ secrets.HIPCHECK_CI_APP_PRIV_KEY }}

# Run a few variants of Hipcheck
- name: Run with Policy
env:
HC_GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: ./target/debug/hc --policy ./config/Hipcheck.kdl check https://github.com/mitre/hipcheck
- name: Run with Local Policy
env:
HC_GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: ./target/debug/hc --policy ./config/local.Hipcheck.kdl check https://github.com/mitre/hipcheck
- name: Run with Config
env:
HC_GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: ./target/debug/hc --config ./config check https://github.com/mitre/hipcheck

0 comments on commit a2a22dc

Please sign in to comment.