|
8 | 8 | - "*.bazel*" |
9 | 9 | - .github/workflows/swift.yml |
10 | 10 | - .github/actions/fetch-codeql/action.yml |
| 11 | + - .github/actions/cache-query-compilation/action.yml |
11 | 12 | - codeql-workspace.yml |
12 | 13 | - .pre-commit-config.yaml |
13 | 14 | - "!**/*.md" |
14 | 15 | - "!**/*.qhelp" |
15 | 16 | branches: |
16 | 17 | - main |
| 18 | + - rc/* |
| 19 | + push: |
| 20 | + paths: |
| 21 | + - "swift/**" |
| 22 | + - "misc/bazel/**" |
| 23 | + - "*.bazel*" |
| 24 | + - .github/workflows/swift.yml |
| 25 | + - .github/actions/fetch-codeql/action.yml |
| 26 | + - .github/actions/cache-query-compilation/action.yml |
| 27 | + - codeql-workspace.yml |
| 28 | + - "!**/*.md" |
| 29 | + - "!**/*.qhelp" |
| 30 | + branches: |
| 31 | + - main |
| 32 | + - rc/* |
17 | 33 |
|
18 | 34 | jobs: |
19 | | - changes: |
20 | | - runs-on: ubuntu-latest |
21 | | - outputs: |
22 | | - codegen: ${{ steps.filter.outputs.codegen }} |
23 | | - ql: ${{ steps.filter.outputs.ql }} |
24 | | - steps: |
25 | | - - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 |
26 | | - id: filter |
27 | | - with: |
28 | | - filters: | |
29 | | - codegen: |
30 | | - - '.github/workflows/swift.yml' |
31 | | - - "misc/bazel/**" |
32 | | - - "*.bazel*" |
33 | | - - 'swift/actions/setup-env/**' |
34 | | - - '.pre-commit-config.yaml' |
35 | | - - 'swift/codegen/**' |
36 | | - - 'swift/schema.py' |
37 | | - - 'swift/**/*.dbscheme' |
38 | | - - 'swift/ql/lib/codeql/swift/elements.qll' |
39 | | - - 'swift/ql/lib/codeql/swift/elements/**' |
40 | | - - 'swift/ql/lib/codeql/swift/generated/**' |
41 | | - - 'swift/ql/test/extractor-tests/generated/**' |
42 | | - - 'swift/ql/.generated.list' |
43 | | - ql: |
44 | | - - 'github/workflows/swift.yml' |
45 | | - - 'swift/**/*.ql' |
46 | | - - 'swift/**/*.qll' |
47 | 35 | # not using a matrix as you cannot depend on a specific job in a matrix, and we want to start linux checks |
48 | 36 | # without waiting for the macOS build |
49 | 37 | build-and-test-macos: |
| 38 | + if: ${{ github.event_name == 'pull_request' }} |
50 | 39 | runs-on: macos-12-xl |
51 | 40 | steps: |
52 | 41 | - uses: actions/checkout@v3 |
53 | 42 | - uses: ./swift/actions/create-extractor-pack |
54 | 43 | - uses: ./swift/actions/run-quick-tests |
55 | 44 | - uses: ./swift/actions/print-unextracted |
56 | 45 | build-and-test-linux: |
57 | | - runs-on: ubuntu-20.04 |
| 46 | + runs-on: ubuntu-latest-xl |
58 | 47 | steps: |
59 | 48 | - uses: actions/checkout@v3 |
60 | 49 | - uses: ./swift/actions/create-extractor-pack |
61 | 50 | - uses: ./swift/actions/run-quick-tests |
62 | 51 | - uses: ./swift/actions/print-unextracted |
63 | 52 | qltests-linux: |
64 | 53 | needs: build-and-test-linux |
65 | | - runs-on: ubuntu-latest |
| 54 | + runs-on: ubuntu-latest-xl |
66 | 55 | steps: |
67 | 56 | - uses: actions/checkout@v3 |
68 | 57 | - uses: ./swift/actions/run-ql-tests |
69 | 58 | qltests-macos: |
| 59 | + if : ${{ github.event_name == 'pull_request' }} |
70 | 60 | needs: build-and-test-macos |
71 | 61 | runs-on: macos-12-xl |
72 | | - strategy: |
73 | | - fail-fast: false |
74 | | - matrix: |
75 | | - slice: ["1/2", "2/2"] |
76 | 62 | steps: |
77 | 63 | - uses: actions/checkout@v3 |
78 | 64 | - uses: ./swift/actions/run-ql-tests |
79 | | - with: |
80 | | - flags: --slice ${{ matrix.slice }} |
81 | 65 | integration-tests-linux: |
82 | 66 | needs: build-and-test-linux |
83 | | - runs-on: ubuntu-latest |
| 67 | + runs-on: ubuntu-latest-xl |
84 | 68 | steps: |
85 | 69 | - uses: actions/checkout@v3 |
86 | 70 | - uses: ./swift/actions/run-integration-tests |
87 | 71 | integration-tests-macos: |
| 72 | + if : ${{ github.event_name == 'pull_request' }} |
88 | 73 | needs: build-and-test-macos |
89 | 74 | runs-on: macos-12-xl |
90 | 75 | steps: |
91 | 76 | - uses: actions/checkout@v3 |
92 | 77 | - uses: ./swift/actions/run-integration-tests |
93 | 78 | codegen: |
| 79 | + if : ${{ github.event_name == 'pull_request' }} |
94 | 80 | runs-on: ubuntu-latest |
95 | | - needs: changes |
96 | | - if: ${{ needs.changes.outputs.codegen == 'true' }} |
97 | 81 | steps: |
98 | 82 | - uses: actions/checkout@v3 |
99 | 83 | - uses: ./swift/actions/setup-env |
|
114 | 98 | name: swift-generated-cpp-files |
115 | 99 | path: generated-cpp-files/** |
116 | 100 | database-upgrade-scripts: |
| 101 | + if : ${{ github.event_name == 'pull_request' }} |
117 | 102 | runs-on: ubuntu-latest |
118 | 103 | steps: |
119 | 104 | - uses: actions/checkout@v3 |
|
0 commit comments