Skip to content

Commit ed356cd

Browse files
committed
ci: use ubuntu-24.04-arm instead of installing cross-compiling tools manually
Signed-off-by: leo <[email protected]>
1 parent 2a43efd commit ed356cd

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

Diff for: .github/workflows/build.yml

+2-21
Original file line numberDiff line numberDiff line change
@@ -23,42 +23,23 @@ jobs:
2323
runtime: linux-x64
2424
container: ubuntu:20.04
2525
- name : Linux (arm64)
26-
os: ubuntu-latest
26+
os: ubuntu-24.04-arm
2727
runtime: linux-arm64
28-
container: ubuntu:20.04
2928
name: Build ${{ matrix.name }}
3029
runs-on: ${{ matrix.os }}
3130
container: ${{ matrix.container || '' }}
3231
steps:
3332
- name: Install common CLI tools
3433
if: ${{ startsWith(matrix.runtime, 'linux-') }}
3534
run: |
36-
export DEBIAN_FRONTEND=noninteractive
37-
ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime
3835
apt-get update
39-
apt-get install -y sudo
40-
sudo apt-get install -y curl wget git unzip zip libicu66 tzdata clang
36+
apt-get install -y curl wget git unzip zip libicu66 tzdata clang
4137
- name: Checkout sources
4238
uses: actions/checkout@v4
4339
- name: Setup .NET
4440
uses: actions/setup-dotnet@v4
4541
with:
4642
dotnet-version: 9.0.x
47-
- name: Configure arm64 packages
48-
if: ${{ matrix.runtime == 'linux-arm64' }}
49-
run: |
50-
sudo dpkg --add-architecture arm64
51-
echo 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main restricted
52-
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted
53-
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted' \
54-
| sudo tee /etc/apt/sources.list.d/arm64.list
55-
sudo sed -i -e 's/^deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
56-
sudo sed -i -e 's/^deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
57-
- name: Install cross-compiling dependencies
58-
if: ${{ matrix.runtime == 'linux-arm64' }}
59-
run: |
60-
sudo apt-get update
61-
sudo apt-get install -y llvm gcc-aarch64-linux-gnu zlib1g-dev:arm64
6243
- name: Build
6344
run: dotnet build -c Release
6445
- name: Publish

0 commit comments

Comments
 (0)