Skip to content

Commit

Permalink
Support linux arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Feb 1, 2024
1 parent 7af5483 commit b21c781
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
platform: linux-x64
- os: ubuntu-latest
platform: linux-musl-x64
- os: ubuntu-latest
platform: linux-arm64
- os: windows-latest
platform: win-x64
- os: windows-latest
Expand All @@ -49,6 +51,21 @@ jobs:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Install ARM Toolchain
if: ${{ matrix.platform == 'linux-arm64' }}
run: |
sudo dpkg --add-architecture arm64
sudo 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'
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
sudo apt update
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64
- name: Publish
run: dotnet publish -r ${{ matrix.platform }} --self-contained

Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
platform: linux-x64
- os: ubuntu-latest
platform: linux-musl-x64
- os: ubuntu-latest
platform: linux-arm64
- os: windows-latest
platform: win-x64
- os: windows-latest
Expand All @@ -33,6 +35,21 @@ jobs:
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Install ARM Toolchain
if: ${{ matrix.platform == 'linux-arm64' }}
run: |
sudo dpkg --add-architecture arm64
sudo 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'
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
sudo apt update
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64
- name: Publish
run: dotnet publish -r ${{ matrix.platform }} --self-contained

Expand Down

0 comments on commit b21c781

Please sign in to comment.