Skip to content
# Check to build Roadster with all combinations (powerset) of features. Because we have a bunch of features, the
# powerset of all features is quite large, meaning we need to run a large number of iterations of the tests. To
# conserve CI usage, as well as mimimize CI time needed on PRs, we'll only run checks against the feature powerset
# once a week, and only if a commit was merged in the past week.
name: Feature Powerset
on:
schedule:
# Run once a week on Friday at 1AM UTC (6PM PST)
- cron: '0 1 * * 5'
workflow_dispatch:
pull_request:
branches: [ main ]
types: [ labeled ]
env:
CARGO_TERM_COLOR: always
jobs:
# https://stackoverflow.com/questions/63014786/how-to-schedule-a-github-actions-nightly-build-but-run-it-only-when-there-where
check_trigger:
runs-on: ubuntu-latest
name: Check trigger
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v4
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'schedule' }}
run: test $(git rev-list --after="7 days" ${{ github.sha }}) && echo "should_run=true" >> "$GITHUB_OUTPUT"
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ github.event_name == 'pull_request' && github.event.label.name == 'powerset_check' }}
run: echo "should_run=true" >> "$GITHUB_OUTPUT"
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
if: ${{ workflow_dispatch }}

Check failure on line 46 in .github/workflows/feature_powerset.yml

View workflow run for this annotation

GitHub Actions / Feature Powerset

Invalid workflow file

The workflow is not valid. .github/workflows/feature_powerset.yml (Line: 46, Col: 13): Unrecognized named-value: 'workflow_dispatch'. Located at position 1 within expression: workflow_dispatch
run: echo "should_run=true" >> "$GITHUB_OUTPUT"
roadster_feature_powerset:
needs: check_trigger
if: ${{ needs.check_trigger.outputs.should_run == 'true' }}
name: Feature powerset
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@cargo-hack
- name: Test
run: cargo hack test --no-fail-fast --feature-powerset --workspace
- name: Check
run: cargo hack check --feature-powerset --no-dev-deps --workspace
- name: Clippy
run: cargo hack clippy --workspace --all-targets --feature-powerset -- -D warnings