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

enable ARM32/64 cross compilation for Linux in CI #897

Merged
merged 1 commit into from
Jul 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,36 @@ jobs:
LD: ld
FC: gfortran
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
exclude:
- os: ubuntu-20.04
friendlyName: Ubuntu
image: ubuntu:18.04
arch: arm64
environment:
AS: aarch64-linux-gnu-as
STRIP: aarch64-linux-gnu-strip
AR: aarch64-linux-gnu-ar
CC: aarch64-linux-gnu-gcc
CPP: aarch64-linux-gnu-cpp
CXX: aarch64-linux-gnu-g++
LD: aarch64-linux-gnu-ld
FC: aarch64-linux-gnu-gfortran
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
- os: ubuntu-20.04
friendlyName: Ubuntu
image: ubuntu:18.04
arch: arm
node: 18.16.1
environment:
AS: arm-linux-gnueabihf-as
STRIP: arm-linux-gnueabihf-strip
AR: arm-linux-gnueabihf-ar
CC: arm-linux-gnueabihf-gcc
CPP: arm-linux-gnueabihf-cpp
CXX: arm-linux-gnueabihf-g++
LD: arm-linux-gnueabihf-ld
FC: arm-linux-gnueabihf-gfortran
PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig

timeout-minutes: 60
env:
RELEASE_CHANNEL: ${{ inputs.environment }}
Expand Down Expand Up @@ -106,6 +133,20 @@ jobs:
libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 \
libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 \
libsecret-1-0
- name: Add additional dependencies for Ubuntu arm64
if: ${{ matrix.friendlyName == 'Ubuntu' && matrix.arch == 'arm64' }}
run: |
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Add additional dependencies for Ubuntu arm
if: ${{ matrix.friendlyName == 'Ubuntu' && matrix.arch == 'arm' }}
run: |
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf pkg-config-arm-linux-gnueabihf
sudo sed -i "s/^deb/deb [arch=amd64,i386]/g" /etc/apt/sources.list
echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ $(lsb_release -s -c) main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ $(lsb_release -s -c)-updates main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
sudo dpkg --add-architecture armhf
sudo apt-get update
sudo apt-get install -y libx11-dev:armhf libx11-xcb-dev:armhf libxkbfile-dev:armhf libsecret-1-dev:armhf
Comment on lines +144 to +149
Copy link
Author

@theofficialgman theofficialgman Jul 9, 2023

Choose a reason for hiding this comment

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

just wanted to note, arm has more dependencies than arm64 and x64 because it has to build fs-admin and keytar from source while arm64 and x64 have prebuilts available and don't

both packages were part of atom and all their repos are archived so asking upstream to build prebuilts for us is not an option. they are easy to build and get rebuilt directly by yarn without any issues.

- uses: actions/checkout@v3
with:
repository: ${{ inputs.repository || github.repository }}
Expand Down
Loading