Cross-compilation on GitHub Actions Round 4 #223
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: x86_64 builds | |
on: push | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build-anisette-server-x86_64: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa | |
sudo apt-get update && sudo apt-get install -y gdc-13 dub libz-dev elfutils | |
- name: Build | |
run: dub build :anisette-server -b release --compiler=gdc-13 -c "static" | |
- name: Rename | |
run: mv "${{github.workspace}}/bin/provision_anisette-server" "${{github.workspace}}/bin/anisette-server-x86_64" | |
- name: Put debug symbols in a separate file | |
run: eu-strip --strip-debug -f "${{github.workspace}}/bin/anisette-server-x86_64.dbg" "${{github.workspace}}/bin/anisette-server-x86_64" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: anisette-server-x86_64 | |
path: | | |
${{github.workspace}}/bin/anisette-server-x86_64 | |
${{github.workspace}}/bin/anisette-server-x86_64.dbg | |
build-anisette-server-i686: | |
runs-on: ubuntu-latest | |
container: ubuntu:23.04 | |
steps: | |
- name: Install dependencies | |
run: | | |
cat << EOF | tee /etc/apt/sources.list.d/gdc-backports.list | |
deb http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu jammy main | |
deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu jammy main | |
EOF | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F | |
apt-get update | |
apt-get install -y git gdc-13-i686-linux-gnu dub libz-dev | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build | |
run: dub build :anisette-server -b release --compiler=i686-linux-gnu-gdc-13 -c "static" | |
- name: Rename | |
run: mv "${{github.workspace}}/bin/provision_anisette-server" "${{github.workspace}}/bin/anisette-server-i686" | |
- name: Put debug symbols in a separate file | |
run: eu-strip --strip-debug -f "${{github.workspace}}/bin/anisette-server-i686.dbg" "${{github.workspace}}/bin/anisette-server-i686" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: anisette-server-i686 | |
path: | | |
${{github.workspace}}/bin/anisette-server-i686 | |
${{github.workspace}}/bin/anisette-server-i686.dbg | |