Skip to content

Commit e9abd81

Browse files
committed
chore: Merge CI changes for neqo
1 parent c54949b commit e9abd81

15 files changed

Lines changed: 106 additions & 610 deletions

File tree

.github/actionlint-matcher.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/actions/check-android/action.yml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
name: 'CI VM'
2-
description: 'Run main CI steps in VMs for VM-only platforms.'
1+
name: "Android checks"
2+
description: "Run Android build and test steps using the Android SDK/NDK and emulator."
33

44
inputs:
55
target:
6-
description: 'Rust target to build for.'
6+
description: "Rust target to build for."
77
required: true
88
working-directory:
9-
description: 'Working directory.'
10-
default: '.'
9+
description: "Working directory."
10+
default: "."
1111
ndk-version:
12-
description: 'NDK version to install.'
12+
description: "NDK version to install."
1313
# https://searchfox.org/mozilla-central/search?q=NDK_VERSION =&path=python/mozboot/mozboot/android.py
14-
default: '27.2.12479018'
14+
default: "27.2.12479018"
1515
api-level:
16-
description: 'Android API level to use.'
16+
description: "Android API level to use."
1717
# https://searchfox.org/mozilla-central/search?q=\bapi_level=&path=taskcluster/scripts/misc/build-llvm-common.sh&regexp=true
1818
# However, NSS requires an API >= 23 for a few symbols.
19-
default: '23'
19+
default: "23"
2020
minimum-nss-version:
21-
description: 'If NSS is required, the minimum version required.'
22-
default: ''
21+
description: "If NSS is required, the minimum version required."
22+
default: ""
2323
github-token:
24-
description: 'A Github PAT'
24+
description: "A Github PAT"
2525
required: true
2626

2727
runs:
2828
using: composite
2929
steps:
30-
- uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
30+
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
3131
with:
3232
distribution: zulu
3333
java-version: 23
@@ -43,18 +43,19 @@ runs:
4343
WD: ${{ inputs.working-directory }}
4444
run: cd "$WD" && sdkmanager --install "ndk;$NDK_VERSION"
4545

46-
- uses: ./.github/actions/rust
46+
- uses: mozilla/actions/rust@b6b1031d2072eb8c2b181887cb5e194ebcc5caab # v1.0.4
4747
with:
4848
version: stable
4949
targets: ${{ inputs.target }}
5050
tools: cargo-ndk@^4
5151
token: ${{ inputs.github-token }}
5252

53-
- uses: ./.github/actions/nss
53+
- uses: mozilla/actions/nss@b6b1031d2072eb8c2b181887cb5e194ebcc5caab # v1.0.4
5454
if: ${{ inputs.minimum-nss-version != '' }}
5555
with:
5656
minimum-version: ${{ inputs.minimum-nss-version }}
5757
target: ${{ inputs.target }}
58+
token: ${{ inputs.github-token }}
5859

5960
- shell: bash
6061
env:
@@ -63,7 +64,11 @@ runs:
6364
WD: ${{ inputs.working-directory }}
6465
run: cd "$WD" && cargo ndk --platform "$API_LEVEL" --target "$TARGET" test --no-run
6566

67+
# FIXME: Enable emulator testing for aarch64 once Google ships Android
68+
# emulator binaries for ARM64 Linux hosts.
69+
# See https://issuetracker.google.com/issues/242699119
6670
- shell: bash
71+
if: ${{ !startsWith(inputs.target, 'aarch64') }}
6772
env:
6873
TARGET: ${{ inputs.target }}
6974
API_LEVEL: ${{ inputs.api-level }}
@@ -91,7 +96,8 @@ runs:
9196
EOF
9297
chmod a+x /tmp/rust-android-run-tests-on-emulator.sh
9398
94-
- uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.35.0
99+
- uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2.37.0
100+
if: ${{ !startsWith(inputs.target, 'aarch64') }}
95101
with:
96102
api-level: ${{ inputs.api-level }}
97103
arch: ${{ startsWith(inputs.target, 'x86_64') && 'x86_64' || (startsWith(inputs.target, 'i686') && 'x86' || (startsWith(inputs.target, 'aarch64') && 'arm64-v8a')) }}

.github/actions/check-vm/action.yml

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: 'CI VM'
2-
description: 'Run main CI steps in VMs for VM-only platforms.'
1+
name: "CI VM"
2+
description: "Run main CI steps in VMs for VM-only platforms."
33

44
inputs:
55
working-directory:
6-
description: 'Working directory.'
7-
default: '.'
6+
description: "Working directory."
7+
default: "."
88
platform:
9-
description: 'Platform to run the checks on.'
10-
default: ''
9+
description: "Platform to run the checks on."
10+
default: ""
1111
codecov-token:
12-
description: 'Codecov token, if Codecov upload is desired.'
13-
default: ''
12+
description: "Codecov token, if Codecov upload is desired."
13+
default: ""
1414

1515
runs:
1616
using: composite
@@ -27,14 +27,14 @@ runs:
2727
set -ex
2828
pwd
2929
case "$PLATFORM" in
30-
freebsd) pkg install -y curl llvm nss pkgconf
30+
freebsd) pkg update -f && pkg install -y curl llvm nss pkgconf
3131
;;
3232
openbsd) # TODO: Is there a way to not pin the version of llvm? -z to pkg_add does not work.
3333
pkg_add rust rust-clippy rust-rustfmt llvm-21.1.2p0 nss # rustup does not support OpenBSD at all
3434
;;
35-
netbsd) /usr/sbin/pkg_add pkgin && pkgin -y install curl clang nss pkgconf
35+
netbsd) /usr/sbin/pkg_add pkgin && pkgin -y update && pkgin -y install curl clang nss pkgconf
3636
;;
37-
solaris) pkg install clang-libs nss pkg-config
37+
solaris) pkg refresh && pkg install clang-libs nss pkg-config
3838
;;
3939
*) echo "Unsupported OS: $PLATFORM"
4040
exit 1
@@ -53,30 +53,28 @@ runs:
5353
cd "$WD"
5454
pwd
5555
case "$PLATFORM" in
56-
freebsd) sh rustup.sh --default-toolchain stable --profile minimal --component clippy,llvm-tools,rustfmt -y
57-
. "\$HOME/.cargo/env"
58-
;;
5956
openbsd) export LIBCLANG_PATH=/usr/local/llvm21/lib
6057
export LLVM_COV=/usr/local/llvm21/bin/llvm-cov
6158
export LLVM_PROFDATA=/usr/local/llvm21/bin/llvm-profdata
62-
[ "$WORKSPACE" ] && EXCLUDE="--exclude fuzz" # Fuzzing not supported on OpenBSD
6359
;;
64-
netbsd) sh rustup.sh --default-toolchain stable --profile minimal --component clippy,llvm-tools,rustfmt -y
60+
*) sh rustup.sh --default-toolchain stable --profile minimal --component clippy,llvm-tools,rustfmt -y
6561
. "\$HOME/.cargo/env"
66-
# FIXME: Why do we need to set this on NetBSD?
62+
;;
63+
esac
64+
case "$PLATFORM" in
65+
netbsd) # FIXME: Why do we need to set this on NetBSD?
6766
export LD_LIBRARY_PATH=/usr/pkg/lib/nss:/usr/pkg/lib/nspr
68-
[ "$WORKSPACE" ] && EXCLUDE="--exclude fuzz" # Fuzzing not supported on NetBSD
6967
;;
70-
solaris) curl --output rust.sh -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install
71-
chmod a+x rust.sh
72-
ls -lt
73-
source ./rust.sh || true # This does not exit with zero on success
74-
export LIBCLANG_PATH="/usr/lib/amd64"
75-
[ "$WORKSPACE" ] && EXCLUDE="--exclude fuzz" # Fuzzing not supported on Solaris
68+
solaris) export LIBCLANG_PATH="/usr/lib/amd64"
69+
;;
70+
esac
71+
case "$PLATFORM" in
72+
freebsd) ;;
73+
*) [ "$WORKSPACE" ] && EXCLUDE="--exclude fuzz" # Fuzzing not supported on this platform
7674
;;
7775
esac
7876
cargo version
79-
cargo check --locked --all-targets $WORKSPACE \$EXCLUDE
77+
cargo check --locked --all-targets $WORKSPACE \${EXCLUDE:-}
8078
case "$PLATFORM" in
8179
openbsd) # clippy fails on OpenBSD, because libfuzzer-sys is not supported.
8280
;;
@@ -105,7 +103,7 @@ runs:
105103
echo "envs=CARGO_TERM_COLOR RUST_BACKTRACE RUST_LOG RUST_TEST_TIME_UNIT RUST_TEST_TIME_INTEGRATION RUST_TEST_TIME_DOCTEST WD" >> "$GITHUB_OUTPUT"
106104
107105
- if: ${{ inputs.platform == 'freebsd' }}
108-
uses: vmactions/freebsd-vm@ba6bedee4a4884da2b782a41a64329a1c8e42ffb # v1.3.8
106+
uses: vmactions/freebsd-vm@4807432c7cab1c3f97688665332c0b932062d31f # v1.4.3
109107
with:
110108
usesh: true
111109
disable-cache: true
@@ -114,7 +112,7 @@ runs:
114112
run: ${{ steps.prep.outputs.run }}
115113

116114
- if: ${{ inputs.platform == 'openbsd' }}
117-
uses: vmactions/openbsd-vm@f5b9bc1261c3d4eed9639fcae0cf5dcc5374ca0c # v1.3.2
115+
uses: vmactions/openbsd-vm@3fafb45f2e2e696249c583835939323fe1c3448c # v1.3.7
118116
with:
119117
usesh: true
120118
disable-cache: true
@@ -123,7 +121,7 @@ runs:
123121
run: ${{ steps.prep.outputs.run }}
124122

125123
- if: ${{ inputs.platform == 'netbsd' }}
126-
uses: vmactions/netbsd-vm@37b614756f0b44b02f5dab4fd9ecb27545d1785e # v1.3.2
124+
uses: vmactions/netbsd-vm@ca7ff0556959998c82761c34ea0c3c99fa084c48 # v1.3.7
127125
with:
128126
usesh: true
129127
disable-cache: true
@@ -132,7 +130,7 @@ runs:
132130
run: ${{ steps.prep.outputs.run }}
133131

134132
- if: ${{ inputs.platform == 'solaris' }}
135-
uses: vmactions/solaris-vm@37d40b6627e80434541454b42841caa4cc77d0cf # v1.2.7
133+
uses: vmactions/solaris-vm@0a231b94365d1911cf62097ef342f6b30d95598f # v1.3.2
136134
with:
137135
release: "11.4-gcc"
138136
usesh: true
@@ -148,7 +146,7 @@ runs:
148146
run: test -f "$WORKING_DIR/codecov.json" && echo "exists=true" >> "$GITHUB_OUTPUT" || true
149147

150148
- if: ${{ steps.check-coverage.outputs.exists == 'true' }}
151-
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
149+
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
152150
with:
153151
files: codecov.json
154152
working-directory: ${{ inputs.working-directory }}

0 commit comments

Comments
 (0)