Skip to content

Commit 88c7f50

Browse files
authored
More arm64 targets in CI (#877)
1 parent 18bd3cb commit 88c7f50

File tree

2 files changed

+145
-20
lines changed

2 files changed

+145
-20
lines changed

.github/workflows/compilers.yml

Lines changed: 143 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ jobs:
2323

2424
aws-lc-rs-2004-gcc:
2525
if: github.repository_owner == 'aws'
26-
name: GCC ${{ matrix.gcc_version }} - CMake ${{ matrix.cmake }} - FIPS ${{ matrix.fips }}
27-
runs-on: ubuntu-22.04
26+
name: x86-64 - GCC ${{ matrix.gcc_version }} - CMake ${{ matrix.cmake }} - FIPS ${{ matrix.fips }}
27+
runs-on: ubuntu-24.04
2828
container:
2929
image: ubuntu:20.04
3030
env:
3131
AWS_LC_SYS_CMAKE_BUILDER: ${{ matrix.cmake }}
32+
CI_GCC_VERSION: ${{ matrix.gcc_version }}
3233
strategy:
3334
fail-fast: false
3435
matrix:
@@ -41,31 +42,32 @@ jobs:
4142
apt-get update
4243
apt-get install -y ca-certificates
4344
apt-get install -y cmake curl sudo git
44-
apt-get install -y --no-install-recommends gpg-agent software-properties-common
45+
apt-get install -y gpg-agent software-properties-common dirmngr
46+
apt-get install -y gcc-${CI_GCC_VERSION} g++-${CI_GCC_VERSION}
47+
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F6BC817356A3D45E C631127F87FA12D1
4548
add-apt-repository --yes ppa:longsleep/golang-backports
4649
apt-get update
4750
apt-get install -y build-essential golang-go
4851
curl -L -O -J https://github.com/PowerShell/PowerShell/releases/download/v7.2.23/powershell_7.2.23-1.deb_amd64.deb
4952
dpkg -i powershell_7.2.23-1.deb_amd64.deb
5053
apt-get install -f
54+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${CI_GCC_VERSION} 100
55+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${CI_GCC_VERSION} 100
5156
rm powershell_7.2.23-1.deb_amd64.deb
5257
- name: Checkout
5358
run: |
59+
set -x
5460
mkdir -p /tmp/aws-lc-rs
5561
git config --global --add safe.directory '*'
5662
git clone --recursive ${{ github.server_url }}/${{ github.repository }}.git /tmp/aws-lc-rs
5763
cd /tmp/aws-lc-rs
5864
git fetch origin ${{ github.sha }}
5965
git checkout --recurse-submodules -b ci-job ${{ github.sha }}
66+
gcc --version
6067
- uses: dtolnay/rust-toolchain@master
6168
id: toolchain
6269
with:
6370
toolchain: stable
64-
- name: Set up GCC
65-
uses: egor-tensin/setup-gcc@v1.3
66-
with:
67-
version: ${{ matrix.gcc_version }}
68-
platform: x64
6971
- name: Run cargo test (debug)
7072
working-directory: /tmp/aws-lc-rs/
7173
run: cargo test -p aws-lc-rs --all-targets --no-default-features --features ${{ (matrix.fips == '0' && 'unstable,aws-lc-sys') || 'unstable,fips' }}
@@ -99,49 +101,168 @@ jobs:
99101
exit 0; # SUCCESS
100102
fi
101103
104+
aws-lc-rs-2004-arm-gcc:
105+
if: github.repository_owner == 'aws'
106+
name: arm64 - GCC ${{ matrix.gcc_version }} - CMake ${{ matrix.cmake }} - FIPS ${{ matrix.fips }}
107+
runs-on: ubuntu-24.04-arm
108+
container:
109+
image: arm64v8/ubuntu:20.04
110+
env:
111+
AWS_LC_SYS_CMAKE_BUILDER: ${{ matrix.cmake }}
112+
CI_GCC_VERSION: ${{ matrix.gcc_version }}
113+
strategy:
114+
fail-fast: false
115+
matrix:
116+
cmake: [ '0', '1' ]
117+
gcc_version: [ '7', '8' ]
118+
fips: [ '0', '1' ]
119+
exclude:
120+
- cmake: 0
121+
fips: 1
122+
steps:
123+
- run: |
124+
set -x
125+
apt-get update
126+
apt-get install -y ca-certificates
127+
apt-get install -y cmake curl sudo git
128+
apt-get install -y gpg-agent software-properties-common dirmngr
129+
apt-get install -y gcc-${CI_GCC_VERSION} g++-${CI_GCC_VERSION}
130+
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F6BC817356A3D45E C631127F87FA12D1
131+
add-apt-repository --yes ppa:longsleep/golang-backports
132+
apt-get update
133+
apt-get install -y build-essential golang-go
134+
curl -L -O -J https://github.com/PowerShell/PowerShell/releases/download/v7.2.23/powershell-7.2.23-linux-arm64.tar.gz
135+
mkdir -p /opt/microsoft/powershell/7
136+
tar zxf powershell-7.2.23-linux-arm64.tar.gz -C /opt/microsoft/powershell/7
137+
chmod +x /opt/microsoft/powershell/7/pwsh
138+
ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
139+
apt-get install -f
140+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${CI_GCC_VERSION} 100
141+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${CI_GCC_VERSION} 100
142+
rm powershell-7.2.23-linux-arm64.tar.gz
143+
- name: Checkout
144+
run: |
145+
set -x
146+
git config --global --add safe.directory '*'
147+
git clone --recursive ${{ github.server_url }}/${{ github.repository }}.git .
148+
git fetch origin ${{ github.sha }}
149+
git checkout --recurse-submodules -b ci-job ${{ github.sha }}
150+
gcc --version
151+
- uses: dtolnay/rust-toolchain@master
152+
id: toolchain
153+
with:
154+
toolchain: stable
155+
- name: Run cargo test (debug)
156+
run: cargo test -p aws-lc-rs --all-targets --no-default-features --features ${{ (matrix.fips == '0' && 'unstable,aws-lc-sys') || 'unstable,fips' }}
157+
- name: Run cargo test (release)
158+
run: cargo test -p aws-lc-rs --release --all-targets --no-default-features --features ${{ (matrix.fips == '0' && 'unstable,aws-lc-sys') || 'unstable,fips' }}
159+
102160
aws-lc-rs-1804-gcc:
103161
if: github.repository_owner == 'aws'
104-
name: GCC ${{ matrix.gcc_version }} - CMake ${{ matrix.cmake }} - FIPS ${{ matrix.fips }}
105-
runs-on: ubuntu-22.04
162+
name: x86-64 - GCC ${{ matrix.gcc_version }} - CMake ${{ matrix.cmake }} - FIPS ${{ matrix.fips }}
163+
runs-on: ubuntu-24.04
106164
container:
107165
image: ubuntu:18.04
108166
env:
109167
AWS_LC_SYS_CMAKE_BUILDER: ${{ matrix.cmake }}
168+
CI_GCC_VERSION: ${{ matrix.gcc_version }}
110169
strategy:
111170
fail-fast: false
112171
matrix:
113172
cmake: [ '0', '1' ]
114173
gcc_version: [ '4.8', '5', '6' ]
115174
fips: [ '0', '1' ]
175+
exclude:
176+
- cmake: 0
177+
fips: 1
116178
steps:
117179
- run: |
118180
set -x
119181
apt-get update
120182
apt-get install -y ca-certificates
121183
apt-get install -y cmake curl sudo git
122-
apt-get install -y --no-install-recommends gpg-agent software-properties-common
184+
apt-get install -y gpg-agent software-properties-common dirmngr
185+
apt-get install -y gcc-${CI_GCC_VERSION} g++-${CI_GCC_VERSION}
186+
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F6BC817356A3D45E C631127F87FA12D1
123187
add-apt-repository --yes ppa:longsleep/golang-backports
124188
apt-get update
125189
apt-get install -y build-essential golang-go
126190
curl -L -O -J https://github.com/PowerShell/PowerShell/releases/download/v7.2.23/powershell_7.2.23-1.deb_amd64.deb
127191
dpkg -i powershell_7.2.23-1.deb_amd64.deb
128192
apt-get install -f
193+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${CI_GCC_VERSION} 100
194+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${CI_GCC_VERSION} 100
129195
rm powershell_7.2.23-1.deb_amd64.deb
130196
- name: Checkout
131197
run: |
198+
set -x
132199
git config --global --add safe.directory '*'
133200
git clone --recursive ${{ github.server_url }}/${{ github.repository }}.git .
134201
git fetch origin ${{ github.sha }}
135202
git checkout --recurse-submodules -b ci-job ${{ github.sha }}
203+
gcc --version
136204
- uses: dtolnay/rust-toolchain@master
137205
id: toolchain
138206
with:
139207
toolchain: stable
140-
- name: Set up GCC
141-
uses: egor-tensin/setup-gcc@v1.3
208+
- name: Run cargo test (debug)
209+
run: cargo test -p aws-lc-rs --all-targets --no-default-features --features ${{ (matrix.fips == '0' && 'unstable,aws-lc-sys') || 'unstable,fips' }}
210+
- name: Run cargo test (release)
211+
run: cargo test -p aws-lc-rs --release --all-targets --no-default-features --features ${{ (matrix.fips == '0' && 'unstable,aws-lc-sys') || 'unstable,fips' }}
212+
213+
aws-lc-rs-1804-arm-gcc:
214+
if: github.repository_owner == 'aws'
215+
name: arm64 - GCC ${{ matrix.gcc_version }} - CMake ${{ matrix.cmake }} - FIPS ${{ matrix.fips }}
216+
runs-on: ubuntu-24.04-arm
217+
container:
218+
image: arm64v8/ubuntu:18.04
219+
env:
220+
AWS_LC_SYS_CMAKE_BUILDER: ${{ matrix.cmake }}
221+
CI_GCC_VERSION: ${{ matrix.gcc_version }}
222+
strategy:
223+
fail-fast: false
224+
matrix:
225+
cmake: [ '0', '1' ]
226+
gcc_version: [ '5', '6' ]
227+
fips: [ '0', '1' ]
228+
exclude:
229+
- cmake: '0'
230+
fips: '1'
231+
- gcc_version: '5'
232+
fips: '1'
233+
steps:
234+
- run: |
235+
set -x
236+
apt-get update
237+
apt-get install -y ca-certificates
238+
apt-get install -y cmake curl sudo git
239+
apt-get install -y gpg-agent software-properties-common dirmngr
240+
apt-get install -y gcc-${CI_GCC_VERSION} g++-${CI_GCC_VERSION}
241+
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys F6BC817356A3D45E C631127F87FA12D1
242+
add-apt-repository --yes ppa:longsleep/golang-backports
243+
apt-get update
244+
apt-get install -y build-essential golang-go
245+
curl -L -O -J https://github.com/PowerShell/PowerShell/releases/download/v7.2.23/powershell-7.2.23-linux-arm64.tar.gz
246+
mkdir -p /opt/microsoft/powershell/7
247+
tar zxf powershell-7.2.23-linux-arm64.tar.gz -C /opt/microsoft/powershell/7
248+
chmod +x /opt/microsoft/powershell/7/pwsh
249+
ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh
250+
apt-get install -f
251+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${CI_GCC_VERSION} 100
252+
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${CI_GCC_VERSION} 100
253+
rm powershell-7.2.23-linux-arm64.tar.gz
254+
- name: Checkout
255+
run: |
256+
set -x
257+
git config --global --add safe.directory '*'
258+
git clone --recursive ${{ github.server_url }}/${{ github.repository }}.git .
259+
git fetch origin ${{ github.sha }}
260+
git checkout --recurse-submodules -b ci-job ${{ github.sha }}
261+
gcc --version
262+
- uses: dtolnay/rust-toolchain@master
263+
id: toolchain
142264
with:
143-
version: ${{ matrix.gcc_version }}
144-
platform: x64
265+
toolchain: stable
145266
- name: Run cargo test (debug)
146267
run: cargo test -p aws-lc-rs --all-targets --no-default-features --features ${{ (matrix.fips == '0' && 'unstable,aws-lc-sys') || 'unstable,fips' }}
147268
- name: Run cargo test (release)
@@ -157,9 +278,14 @@ jobs:
157278
fail-fast: false
158279
matrix:
159280
rust: [ stable ]
160-
os: [ ubuntu-latest, macos-13, macos-14, macos-latest, windows-latest ]
281+
os: [ ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-14, macos-latest, windows-latest, windows-11-arm ]
161282
c_std: [ "11", "99" ]
162283
cmake: [ '0', '1' ]
284+
exclude:
285+
- os: windows-latest
286+
cmake: 0
287+
- os: windows-11-arm
288+
cmake: 0
163289
steps:
164290
- uses: actions/checkout@v4
165291
with:
@@ -168,8 +294,7 @@ jobs:
168294
id: toolchain
169295
with:
170296
toolchain: stable
171-
- if: ${{ !startsWith(matrix.os, 'windows-') || matrix.cmake == '1' }} # Windows requires CMake build
172-
name: Run cargo test
297+
- name: Run cargo test
173298
working-directory: ./aws-lc-rs
174299
env:
175300
AWS_LC_SYS_PREBUILT_NASM: 1

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
fail-fast: false
3030
matrix:
3131
rust: [ stable ]
32-
os: [ ubuntu-latest, macos-13, macos-latest ]
32+
os: [ ubuntu-latest, macos-13, macos-latest, ubuntu-24.04-arm ]
3333
args:
3434
- --all-targets --features unstable
3535
- --release --all-targets --features unstable
@@ -93,7 +93,7 @@ jobs:
9393
fail-fast: false
9494
matrix:
9595
rust: [ stable ]
96-
os: [ windows-2022 ]
96+
os: [ windows-latest, windows-11-arm ]
9797
args:
9898
- --all-targets --features unstable
9999
- --all-targets --features bindgen,unstable

0 commit comments

Comments
 (0)