Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARM64 build #1869

Closed
wants to merge 14 commits into from
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,39 @@ jobs:
git diff
[[ -z "$(git status --porcelain)" ]]

build-arm64:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no arm machines on the list, all available machines are x64 based.
I think GH only supports arm on self hosted runners.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to work around that with uraimo/run-on-arch-action@v2.5.0, but I cannot get it working, so I assume we have to wait for gh actions to add support.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, it's using QEMU emulator. Might be easier to test that locally first.

timeout-minutes: 60
steps:
- uses: actions/checkout@v3.2.0
- name: Build ARM64
uses: uraimo/run-on-arch-action@v2.5.0
with:
arch: aarch64
distro: bullseye
run: |
touch /etc/apt/sources.list.d/backports.list
echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/backports.list
apt-get update
apt-get upgrade
apt-get install -y curl clang cmake make protobuf-compiler
apt-get install -y -t stretch-backports libgrpc++-dev libgrpc++1 libgrpc6 libgrpc-dev protobuf-compiler-grpc
curl -sSL https://dot.net/v1/dotnet-install.sh --output dotnet-install.sh
chmod +x ./dotnet-install.sh
./dotnet-install.sh -c 6.0 --install-dir /usr/share/dotnet --no-path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
./dotnet-install.sh -c 6.0 --install-dir /usr/share/dotnet --no-path
./dotnet-install.sh -channel 6.0.xxx --install-dir /usr/share/dotnet

Could try this one. Seems it doesn't know about the installed dotnet versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, cheers :)

./dotnet-install.sh -c 7.0 --install-dir /usr/share/dotnet --no-path
rm dotnet-install.sh
./build.sh Workflow --containers linux
- name: Publish ARM64 build
uses: actions/upload-artifact@v3.1.1
with:
name: bin-arm64
path: bin/tracer-home
if: (${{ job.status }} != 'cancelled')
continue-on-error: true

build-container:
strategy:
fail-fast: false
Expand Down Expand Up @@ -150,6 +183,12 @@ jobs:
name: bin-macos-11
path: nuget/bin-macos

- name: Download ARM64 Artifacts from build job
uses: actions/download-artifact@v3.0.1
with:
name: bin-arm64
path: nuget/bin-arm64

- name: Build NuGet package
run: nuget pack OpenTelemetry.AutoInstrumentation.nuspec -Properties NoWarn=NU5100,NU5123,NU5128
working-directory: nuget
Expand Down