CI: Fix Ubuntu aarch64 build again

* Use a clean Ubuntu Docker container to hopefully have a more stable environment
* Remove old workarounds
This commit is contained in:
Nadia Holmquist Pedersen 2021-12-28 18:26:52 +01:00 committed by GitHub
parent 08a19d930c
commit 3d24057155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 23 deletions

View File

@ -14,42 +14,37 @@ env:
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ubuntu:20.04
steps: steps:
- uses: actions/checkout@v1 - name: Prepare system
- name: Upgrade system
shell: bash shell: bash
working-directory: ${{runner.workspace}}
run: | run: |
sudo apt update apt update
sudo ACCEPT_EULA=Y apt full-upgrade apt -y full-upgrade
apt -y install git
- name: Check out source
uses: actions/checkout@v1
- name: Install dependencies - name: Install dependencies
shell: bash shell: bash
working-directory: ${{runner.workspace}}
run: | run: |
sudo rm -f /etc/apt/sources.list.d/kubernetes.list dpkg --add-architecture arm64
sudo dpkg --add-architecture arm64 sh -c "sed \"s|^deb \([a-z\.:/]*\) \([a-z\-]*\) \(.*\)$|deb [arch=amd64] \1 \2 \3\ndeb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports \2 \3|\" /etc/apt/sources.list > /etc/apt/sources.list.new"
sudo sh -c "sed \"s|^deb \([a-z\.:/]*\) \([a-z\-]*\) \(.*\)$|deb [arch=amd64] \1 \2 \3\ndeb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports \2 \3|\" /etc/apt/sources.list > /etc/apt/sources.list.new" rm /etc/apt/sources.list
sudo rm /etc/apt/sources.list mv /etc/apt/sources.list{.new,}
sudo mv /etc/apt/sources.list{.new,} apt update
sudo apt update DEBIAN_FRONTEND=noninteractive apt install -y {gcc-10,g++-10,pkg-config}-aarch64-linux-gnu {libsdl2,qtbase5,libslirp,libarchive,libepoxy}-dev:arm64 cmake dpkg-dev
sudo apt install aptitude
sudo aptitude install -y {gcc-10,g++-10,pkg-config}-aarch64-linux-gnu libsdl2-dev:arm64 qtbase5-dev:arm64 libslirp-dev:arm64 libarchive-dev:arm64 libepoxy-dev:arm64
- name: Create build environment
run: mkdir ${{runner.workspace}}/build
- name: Configure - name: Configure
shell: bash shell: bash
working-directory: ${{runner.workspace}}/build
run: | run: |
CC=aarch64-linux-gnu-gcc-10 CXX=aarch64-linux-gnu-g++-10 cmake -DPKG_CONFIG_EXECUTABLE=/usr/bin/aarch64-linux-gnu-pkg-config $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE CC=aarch64-linux-gnu-gcc-10 CXX=aarch64-linux-gnu-g++-10 cmake -DPKG_CONFIG_EXECUTABLE=/usr/bin/aarch64-linux-gnu-pkg-config $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -B build
- name: Make - name: Make
shell: bash shell: bash
working-directory: ${{runner.workspace}}/build
run: | run: |
make -j$(nproc --all) \ cmake --build build -j$(nproc --all)
&& mkdir dist \ mkdir dist
&& cp melonDS dist cp build/melonDS dist
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
with: with:
name: melonDS-ubuntu-aarch64 name: melonDS-ubuntu-aarch64
path: ${{runner.workspace}}/build/dist path: dist