mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
* initial check wiring script * use wiring script + fixes * add assertNoErrors * test fixes * add wiring check exception * Add check_test_wiring.zig to CI manager filters Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com> --------- Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
95 lines
2.9 KiB
YAML
95 lines
2.9 KiB
YAML
on:
|
|
pull_request:
|
|
|
|
# cancel current runs when a new commit is pushed
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
# Do not add permissions here! Configure them at the job level!
|
|
permissions: {}
|
|
|
|
name: CI Manager
|
|
|
|
jobs:
|
|
check-changes:
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
pull-requests: read
|
|
outputs:
|
|
zig: ${{ steps.filter.outputs.zig }}
|
|
other_than_zig: ${{ steps.other_filter.outputs.other_than_zig }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
zig:
|
|
- 'src/**'
|
|
- 'test/**'
|
|
- 'build.zig'
|
|
- 'build.zig.zon'
|
|
- '.github/workflows/ci_zig.yml'
|
|
- '.github/workflows/ci_cross_compile.yml'
|
|
- '.github/actions/flaky-retry/action.yml'
|
|
- 'ci/zig_lints.sh'
|
|
- 'ci/check_test_wiring.zig'
|
|
- uses: dorny/paths-filter@v3
|
|
id: other_filter
|
|
with:
|
|
# Makes it so that every pattern below must match.
|
|
# This enables the negative patterns to disable this job.
|
|
predicate-quantifier: 'every'
|
|
filters: |
|
|
other_than_zig:
|
|
- '**/*'
|
|
- '!src/**'
|
|
- '!test/**'
|
|
- '!build.zig'
|
|
- '!build.zig.zon'
|
|
- '!.github/workflows/ci_zig.yml'
|
|
- '!.github/workflows/ci_cross_compile.yml'
|
|
- '!.github/actions/flaky-retry/action.yml'
|
|
- '!ci/zig_lints.sh'
|
|
- '!ci/check_test_wiring.zig'
|
|
# Files that ci manager workflows should not run on.
|
|
- '!.gitignore'
|
|
- '!.reuse'
|
|
- '!authors'
|
|
- '!legal_details'
|
|
- '!LICENSE'
|
|
- '!*.md'
|
|
- '!src/**/*.md'
|
|
- '!design/**'
|
|
- '!examples/**'
|
|
|
|
call-zig-workflow:
|
|
needs: check-changes
|
|
if: needs.check-changes.outputs.zig == 'true'
|
|
uses: ./.github/workflows/ci_zig.yml
|
|
|
|
call-old-workflow:
|
|
needs: check-changes
|
|
if: needs.check-changes.outputs.other_than_zig == 'true'
|
|
uses: ./.github/workflows/ci_manager_old.yml
|
|
|
|
finish:
|
|
needs: [check-changes, call-zig-workflow, call-old-workflow]
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
- name: Check workflow results
|
|
run: |
|
|
if [[ "${{ needs.check-changes.outputs.zig }}" == "true" ]]; then
|
|
if [[ "${{ needs.call-zig-workflow.result }}" != "success" ]]; then
|
|
echo "ci_zig.yml failed."
|
|
exit 1
|
|
fi
|
|
fi
|
|
if [[ "${{ needs.check-changes.outputs.other_than_zig }}" == "true" ]]; then
|
|
if [[ "${{ needs.call-old-workflow.result }}" != "success" ]]; then
|
|
echo "ci_manager_old.yml failed."
|
|
exit 1
|
|
fi
|
|
fi
|