Skip to content

Commit

Permalink
Compile for arm64 in GitHub Actions
Browse files Browse the repository at this point in the history
Cross-architecture compile for arm64 on GitHub Actions' ubuntu-latest hosted runner.
See https://learn.microsoft.com/dotnet/core/deploying/native-aot/cross-compile#linux.
Effectively a revert of #973.
  • Loading branch information
martincostello committed Nov 28, 2023
1 parent 4efd905 commit 36b378d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 53 deletions.
26 changes: 0 additions & 26 deletions .dockerignore

This file was deleted.

8 changes: 0 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
version: 2
updates:
- package-ecosystem: docker
directory: "/"
schedule:
interval: daily
time: "05:30"
timezone: Europe/London
reviewers:
- "martincostello"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ jobs:

steps:

- name: Setup arm64 support for native AoT
if: runner.os == 'Linux'
shell: bash
run: |
dpkg --add-architecture arm64
bash -c 'cat > /etc/apt/sources.list.d/arm64.list <<EOF
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
EOF'
sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
apt update
apt install --yes clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

Expand Down
18 changes: 0 additions & 18 deletions Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function DotNetPublish {

if ($IsLinux -And (-Not $UseManagedRuntime)) {
$additionalArgs += "--runtime"
$additionalArgs += "linux-x64"
$additionalArgs += "linux-arm64"
$additionalArgs += "--self-contained"
$additionalArgs += "true"
$additionalArgs += "/p:AssemblyName=bootstrap"
Expand Down

0 comments on commit 36b378d

Please sign in to comment.