Skip to content

Commit ad48d14

Browse files
authored
Align GitHub workflow/job run conditions (#394)
1 parent 34283fa commit ad48d14

File tree

5 files changed

+58
-28
lines changed

5 files changed

+58
-28
lines changed

.github/workflows/analysis.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: analysis
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- '*'
7+
- '!generate/aws-lc-*'
68
pull_request:
79
branches:
810
- '*'
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
914

1015
env:
1116
RUST_BACKTRACE: 1
@@ -19,6 +24,7 @@ env:
1924

2025
jobs:
2126
rustfmt:
27+
if: github.repository_owner == 'aws'
2228
runs-on: ubuntu-latest
2329
steps:
2430
- uses: actions/checkout@v3
@@ -36,6 +42,7 @@ jobs:
3642
run: cargo fmt -- --check --verbose
3743

3844
clippy:
45+
if: github.repository_owner == 'aws'
3946
runs-on: ubuntu-latest
4047
strategy:
4148
fail-fast: false
@@ -62,7 +69,7 @@ jobs:
6269
run: cargo clippy ${{ matrix.features }} --all-targets -- -W clippy::all -W clippy::pedantic -D warnings
6370

6471
apidiff:
65-
if: github.repository == 'aws/aws-lc-rs'
72+
if: github.repository_owner == 'aws'
6673
runs-on: ubuntu-latest
6774
strategy:
6875
fail-fast: false
@@ -96,6 +103,7 @@ jobs:
96103
cargo public-api diff --deny changed --deny removed "${CRATE_VERSION}"
97104
98105
dependency-review:
106+
if: github.repository_owner == 'aws'
99107
runs-on: ubuntu-latest
100108
steps:
101109
- name: 'Checkout Repository'
@@ -108,7 +116,7 @@ jobs:
108116
allow-licenses: Apache-2.0, ISC, MIT, MIT-0
109117

110118
udeps:
111-
if: github.repository == 'aws/aws-lc-rs'
119+
if: github.repository_owner == 'aws'
112120
runs-on: ubuntu-latest
113121
steps:
114122
- uses: actions/checkout@v3
@@ -133,7 +141,7 @@ jobs:
133141
RUSTC_WRAPPER: ""
134142

135143
bindgen-dependency:
136-
if: github.repository == 'aws/aws-lc-rs'
144+
if: github.repository_owner == 'aws'
137145
runs-on: ${{ matrix.os }}
138146
strategy:
139147
fail-fast: false
@@ -164,7 +172,7 @@ jobs:
164172
}
165173
166174
bindgen-fips-dependency:
167-
if: github.repository == 'aws/aws-lc-rs'
175+
if: github.repository_owner == 'aws'
168176
runs-on: ${{ matrix.os }}
169177
strategy:
170178
fail-fast: false
@@ -195,7 +203,7 @@ jobs:
195203
}
196204
197205
mirai-analysis:
198-
if: github.repository == 'aws/aws-lc-rs'
206+
if: github.repository_owner == 'aws'
199207
runs-on: ubuntu-latest
200208
steps:
201209
- uses: actions/checkout@v3
@@ -229,7 +237,7 @@ jobs:
229237
cargo mirai
230238
231239
minimal-versions:
232-
if: github.repository == 'aws/aws-lc-rs'
240+
if: github.repository_owner == 'aws'
233241
name: Resolve the dependencies to the minimum SemVer version
234242
runs-on: ubuntu-latest
235243
steps:
@@ -249,6 +257,7 @@ jobs:
249257
run: cargo --locked check
250258

251259
copyright:
260+
if: github.repository_owner == 'aws'
252261
runs-on: ubuntu-latest
253262
steps:
254263
- uses: actions/checkout@v3
@@ -258,6 +267,7 @@ jobs:
258267
./scripts/tools/copyright_check.sh
259268
260269
semver-checks:
270+
if: github.repository_owner == 'aws'
261271
runs-on: ubuntu-latest
262272
steps:
263273
- name: Checkout

.github/workflows/cross.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: cross
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- '*'
7+
- '!generate/aws-lc-*'
68
pull_request:
79
branches:
810
- '*'
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
914

1015
env:
1116
RUST_BACKTRACE: 1
@@ -15,7 +20,7 @@ env:
1520

1621
jobs:
1722
aws-lc-rs-cross-test:
18-
if: github.repository == 'aws/aws-lc-rs'
23+
if: github.repository_owner == 'aws'
1924
name: aws-lc-rs cross tests
2025
runs-on: ${{ matrix.os }}
2126
strategy:
@@ -59,7 +64,7 @@ jobs:
5964
run: cross test -p aws-lc-rs --release --features bindgen,unstable --target ${{ matrix.target }}
6065

6166
aws-lc-rs-ios-aarch64:
62-
if: github.repository == 'aws/aws-lc-rs'
67+
if: github.repository_owner == 'aws'
6368
name: iOS aarch64 cross-platform build
6469
runs-on: macos-13-xlarge
6570
steps:
@@ -77,7 +82,7 @@ jobs:
7782
run: ./scripts/ci/ios-simulator-runner.sh
7883

7984
aws-lc-rs-ios-x86_64:
80-
if: github.repository == 'aws/aws-lc-rs'
85+
if: github.repository_owner == 'aws'
8186
name: iOS x86-64 cross-platform build
8287
runs-on: macos-13-xlarge
8388
steps:

.github/workflows/fips.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: fips
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- '*'
7+
- '!generate/aws-lc-*'
68
pull_request:
79
branches:
810
- '*'
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
914

1015
env:
1116
RUST_BACKTRACE: 1
@@ -15,7 +20,7 @@ env:
1520

1621
jobs:
1722
fips-test:
18-
if: github.repository == 'aws/aws-lc-rs'
23+
if: github.repository_owner == 'aws'
1924
name: aws-lc-rs fips-tests
2025
runs-on: ${{ matrix.os }}
2126
env:
@@ -52,7 +57,7 @@ jobs:
5257
# See: https://github.com/rust-lang/cargo/issues/8531
5358
run: cargo test --tests ${{ matrix.args }}
5459
windows-fips-test:
55-
if: github.repository == 'aws/aws-lc-rs'
60+
if: github.repository_owner == 'aws'
5661
name: aws-lc-rs windows-fips-tests
5762
runs-on: ${{ matrix.os }}
5863
strategy:

.github/workflows/integration.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: integration
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- '*'
7+
- '!generate/aws-lc-*'
68
pull_request:
79
branches:
810
- '*'
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
914

1015
env:
1116
RUST_BACKTRACE: 1
@@ -15,7 +20,7 @@ env:
1520

1621
jobs:
1722
s2n-quic-integration:
18-
if: github.repository == 'aws/aws-lc-rs'
23+
if: github.repository_owner == 'aws'
1924
name: s2n-quic-integration
2025
runs-on: ${{ matrix.os }}
2126
strategy:
@@ -36,7 +41,7 @@ jobs:
3641
./scripts/run-s2n-quic-integration.sh
3742
3843
rustls-integration:
39-
if: github.repository == 'aws/aws-lc-rs'
44+
if: github.repository_owner == 'aws'
4045
name: rustls-integration
4146
runs-on: ${{ matrix.os }}
4247
strategy:
@@ -59,7 +64,7 @@ jobs:
5964
./scripts/run-rustls-integration.sh
6065
6166
links-crate-tests:
62-
if: github.repository == 'aws/aws-lc-rs'
67+
if: github.repository_owner == 'aws'
6368
name: sys crate tests
6469
runs-on: ${{ matrix.os }}
6570
strategy:
@@ -92,7 +97,7 @@ jobs:
9297
run: cargo run --features ${{ matrix.features }} --no-default-features
9398

9499
publish-dry-run:
95-
if: github.repository == 'aws/aws-lc-rs'
100+
if: github.repository_owner == 'aws'
96101
name: publish dry-run
97102
runs-on: ${{ matrix.os }}
98103
strategy:
@@ -136,7 +141,7 @@ jobs:
136141

137142
msrv:
138143
name: Minimum Supported Rust Version
139-
if: github.repository == 'aws/aws-lc-rs'
144+
if: github.repository_owner == 'aws'
140145
runs-on: ${{ matrix.os }}
141146
strategy:
142147
fail-fast: false

.github/workflows/tests.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@ name: tests
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches:
6+
- '*'
7+
- '!generate/aws-lc-*'
68
pull_request:
79
branches:
810
- '*'
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
914

1015
env:
1116
RUST_BACKTRACE: 1
@@ -16,7 +21,7 @@ env:
1621
jobs:
1722

1823
aws-lc-rs-test:
19-
if: github.repository == 'aws/aws-lc-rs'
24+
if: github.repository_owner == 'aws'
2025
name: aws-lc-rs tests
2126
runs-on: ${{ matrix.os }}
2227
strategy:
@@ -49,7 +54,7 @@ jobs:
4954
run: cargo test --all-targets
5055

5156
bindgen-test:
52-
if: github.repository == 'aws/aws-lc-rs'
57+
if: github.repository_owner == 'aws'
5358
name: aws-lc-rs bindgen-tests
5459
runs-on: ${{ matrix.os }}
5560
strategy:
@@ -75,7 +80,7 @@ jobs:
7580
run: cargo test ${{ matrix.args }}
7681

7782
windows-test:
78-
if: github.repository == 'aws/aws-lc-rs'
83+
if: github.repository_owner == 'aws'
7984
name: aws-lc-rs windows-tests
8085
runs-on: ${{ matrix.os }}
8186
strategy:
@@ -140,7 +145,7 @@ jobs:
140145
files: ${{ runner.temp }}/lcov.info,${{ runner.temp }}/lcov-fips.info
141146

142147
aws-lc-rs-asan:
143-
if: github.repository == 'aws/aws-lc-rs'
148+
if: github.repository_owner == 'aws'
144149
name: aws-lc-rs asan
145150
strategy:
146151
matrix:
@@ -170,7 +175,7 @@ jobs:
170175
run: cargo test ${{ matrix.args }} --lib --bins --tests --examples --target x86_64-unknown-linux-gnu --features asan
171176

172177
build-env-test:
173-
if: github.repository == 'aws/aws-lc-rs'
178+
if: github.repository_owner == 'aws'
174179
name: aws-lc-rs build-env-test
175180
runs-on: ${{ matrix.os }}
176181
strategy:
@@ -193,7 +198,7 @@ jobs:
193198
run: AWS_LC_SYS_STATIC=${{ matrix.static }} cargo test --tests
194199

195200
build-env-fips-test:
196-
if: github.repository == 'aws/aws-lc-rs'
201+
if: github.repository_owner == 'aws'
197202
name: aws-lc-rs build-env-fips-test
198203
runs-on: ${{ matrix.os }}
199204
strategy:
@@ -220,7 +225,7 @@ jobs:
220225
run: AWS_LC_FIPS_SYS_STATIC=${{ matrix.static }} cargo test --tests --features fips
221226

222227
careful:
223-
if: github.repository == 'aws/aws-lc-rs'
228+
if: github.repository_owner == 'aws'
224229
name: Run carefully
225230
runs-on: ${{ matrix.os }}
226231
strategy:

0 commit comments

Comments
 (0)