|
1 | | -name: CI for PR Merge |
| 1 | +name: CI |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
|
8 | 8 | - cron: '3 11 * * *' |
9 | 9 |
|
10 | 10 | jobs: |
11 | | - macos_build: |
12 | | - runs-on: macos-latest |
| 11 | + build: |
| 12 | + strategy: |
| 13 | + fail-fast: false |
| 14 | + matrix: |
| 15 | + os: [macos-latest, ubuntu-latest, windows-latest] |
| 16 | + bazel_version: ['9.x', rolling] |
| 17 | + runs-on: ${{ matrix.os }} |
| 18 | + env: |
| 19 | + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} |
13 | 20 | steps: |
14 | 21 | - uses: actions/checkout@v2 |
15 | | - - uses: ./.github/actions/build_and_test |
16 | | - with: |
17 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
| 22 | + - name: Execute Tests |
| 23 | + shell: bash |
| 24 | + env: |
| 25 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 26 | + run: bazelisk test //... |
| 27 | + - name: Execute Integration Tests |
| 28 | + shell: bash |
| 29 | + # Bazel-in-Bazel still has issues with runfiles |
| 30 | + if: runner.os != 'Windows' |
| 31 | + env: |
| 32 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 33 | + run: bazelisk test //:all_integration_tests |
18 | 34 |
|
19 | | - ubuntu_build: |
20 | | - runs-on: ubuntu-latest |
| 35 | + example_simple: |
| 36 | + strategy: |
| 37 | + fail-fast: false |
| 38 | + matrix: |
| 39 | + os: [macos-latest, ubuntu-latest, windows-latest] |
| 40 | + bazel_version: ['7.x', '8.x'] |
| 41 | + runs-on: ${{ matrix.os }} |
| 42 | + env: |
| 43 | + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v2 |
| 46 | + - name: Test |
| 47 | + shell: bash |
| 48 | + working-directory: examples/simple |
| 49 | + run: bazelisk test //... |
| 50 | + |
| 51 | + example_specify_assets: |
| 52 | + strategy: |
| 53 | + fail-fast: false |
| 54 | + matrix: |
| 55 | + os: [macos-latest, ubuntu-latest, windows-latest] |
| 56 | + bazel_version: ['7.x', '8.x'] |
| 57 | + runs-on: ${{ matrix.os }} |
| 58 | + env: |
| 59 | + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v2 |
| 62 | + - name: Test |
| 63 | + shell: bash |
| 64 | + working-directory: examples/specify_assets |
| 65 | + run: bazelisk test //... |
| 66 | + |
| 67 | + example_bzlmod: |
| 68 | + strategy: |
| 69 | + fail-fast: false |
| 70 | + matrix: |
| 71 | + os: [macos-latest, ubuntu-latest, windows-latest] |
| 72 | + bazel_version: ['7.x', '8.x', '9.x', rolling] |
| 73 | + runs-on: ${{ matrix.os }} |
21 | 74 | env: |
22 | | - CC: clang |
| 75 | + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} |
23 | 76 | steps: |
24 | 77 | - uses: actions/checkout@v2 |
25 | | - - uses: ./.github/actions/build_and_test |
26 | | - with: |
27 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
| 78 | + - name: Test |
| 79 | + shell: bash |
| 80 | + working-directory: examples/bzlmod |
| 81 | + run: bazelisk test //... |
28 | 82 |
|
29 | | - windows_build: |
30 | | - runs-on: windows-latest |
| 83 | + example_bzlmod_specify_assets: |
| 84 | + strategy: |
| 85 | + fail-fast: false |
| 86 | + matrix: |
| 87 | + os: [macos-latest, ubuntu-latest, windows-latest] |
| 88 | + bazel_version: ['9.x', rolling] |
| 89 | + runs-on: ${{ matrix.os }} |
| 90 | + env: |
| 91 | + USE_BAZEL_VERSION: ${{ matrix.bazel_version }} |
31 | 92 | steps: |
32 | 93 | - uses: actions/checkout@v2 |
33 | | - - uses: ./.github/actions/build_and_test |
34 | | - with: |
35 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
| 94 | + - name: Test |
| 95 | + shell: bash |
| 96 | + working-directory: examples/bzlmod_specify_assets |
| 97 | + run: bazelisk test //... |
| 98 | + |
| 99 | + result: |
| 100 | + if: always() |
| 101 | + needs: |
| 102 | + - build |
| 103 | + - example_simple |
| 104 | + - example_specify_assets |
| 105 | + - example_bzlmod |
| 106 | + - example_bzlmod_specify_assets |
| 107 | + runs-on: ubuntu-latest |
| 108 | + steps: |
| 109 | + - run: exit 1 |
| 110 | + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') |
0 commit comments