WIP: Add more CI builds #25
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
# Github Actions configuration | |
name: CI | |
permissions: {} | |
on: | |
# Trigger the workflow on push or pull requests, but only for the | |
# master and ci branches | |
push: | |
branches: | |
- master | |
- ci | |
pull_request: | |
branches: | |
- master | |
env: | |
MAKEFLAGS: -j 2 | |
jobs: | |
build-22_04: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Install deps' | |
run: > | |
sudo apt-get update -y && | |
sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-suggests --no-install-recommends | |
make | |
clang | |
gcc-10-i686-linux-gnu | |
libc6-dev-i386-cross | |
gcc-mingw-w64 | |
wine | |
dos2unix | |
qemu-user | |
gcc-10-aarch64-linux-gnu | |
libc6-dev-arm64-cross | |
gcc-10-arm-linux-gnueabi | |
libc6-dev-armel-cross | |
gcc-10-powerpc-linux-gnu | |
libc6-dev-powerpc-cross | |
gcc-10-powerpc64-linux-gnu | |
libc6-dev-ppc64-cross | |
- name: 'Compile with gcc' | |
run: make linux | |
- name: 'Run tests with gcc' | |
run: make test | |
- name: 'Compile with clang' | |
run: make clean && make linux LINUX_CC=clang | |
- name: 'Run tests with clang' | |
run: make test | |
- name: 'Compile with gcc 32-bit' | |
run: make clean && make linux LINUX_CC=i686-linux-gnu-gcc-10 LINUX_CFLAGS='-m32 -O2 -DUNIX -Wall -Wshadow -Wpedantic -Wcast-qual -Wcast-align -Wwrite-strings -Wno-attributes' LDFLAGS=-static | |
- name: 'Run tests with gcc 32-bit' | |
run: make test | |
- name: 'Compile with gcc-aarch64' | |
run: make clean && make linux LINUX_CC=aarch64-linux-gnu-gcc-10 LDFLAGS=-static | |
- name: 'Run tests with gcc-aarch64' | |
run: make test TESTWRAPPER=qemu-aarch64 | |
- name: 'Compile with gcc-arm' | |
run: make clean && make linux LINUX_CC=arm-linux-gnueabi-gcc-10 LDFLAGS=-static | |
- name: 'Run tests with gcc-arm' | |
run: make test TESTWRAPPER=qemu-arm | |
- name: 'Compile with gcc-powerpc' | |
run: make clean && make linux LINUX_CC=powerpc-linux-gnu-gcc-10 LDFLAGS=-static | |
- name: 'Run tests with gcc-powerpc' | |
run: make test TESTWRAPPER=qemu-ppc | |
- name: 'Compile with gcc-powerpc64' | |
run: make clean && make linux LINUX_CC=powerpc64-linux-gnu-gcc-10 LDFLAGS=-static | |
- name: 'Run tests with gcc-powerpc64' | |
run: make test TESTWRAPPER=qemu-ppc64 | |
- name: 'Set up wine' | |
run: | | |
cat >wine-wrapper <<EOF | |
#!/bin/bash | |
set -o pipefail | |
# Show all errors except for the ones about querying the display | |
WINEDEBUG=-all,err+all,-explorer,-rpc wine "\$@" |& dos2unix | |
EOF | |
chmod 755 wine-wrapper | |
# Run wine once to set it up, which displays some logs that would mess up tests | |
WINEDEBUG=-all wine cmd /c exit | |
- name: 'Compile with mingw32' | |
run: make clean && make linux LINUX_CC=x86_64-w64-mingw32-gcc | |
- name: 'Run tests with mingw32+wine' | |
run: make test TESTWRAPPER=./wine-wrapper | |
- name: 'Compile with mingw32-posix' | |
run: make clean && make linux LINUX_CC=x86_64-w64-mingw32-gcc-10-posix | |
- name: 'Run tests with mingw32-posix+wine' | |
run: make test TESTWRAPPER=./wine-wrapper | |
osx-12-x86_64: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Compile with gcc on x86_64' | |
run: make linux | |
- name: 'Run tests with gcc on x86_64' | |
run: make test | |
- name: 'Compile fat binary with gcc on x86_64' | |
run: make clean && make linux LINUX_CC=cc LINUX_CFLAGS='-O2 -DUNIX -arch arm64 -arch x86_64' | |
- name: 'Run tests with fat binary with gcc on x86_64' | |
run: make test | |
osx-14-aarch64: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Compile with gcc on aarch64' | |
# nroff is not available, so skip the man build | |
run: touch fvcbm.man && make linux | |
- name: 'Run tests with gcc on aarch64' | |
run: make test | |
- name: 'Compile fat binary with gcc on aarch64' | |
# nroff is not available, so skip the man build | |
run: make clean && touch fvcbm.man && make linux LINUX_CC=cc LINUX_CFLAGS='-O2 -DUNIX -arch arm64 -arch x86_64' | |
- name: 'Run tests with fat binary with gcc on aarch64' | |
run: make test | |
alpine-3: | |
runs-on: ubuntu-latest | |
container: 'alpine:3.19' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Install deps' | |
run: > | |
apk add --no-cache | |
build-base | |
groff | |
- name: 'Compile with gcc with MUSL' | |
run: make linux | |
- name: 'Run tests with gcc with MUSL' | |
run: make test | |
freebsd-13: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'build & test on FreeBSD' | |
uses: cross-platform-actions/action@v0 | |
with: | |
operating_system: "freebsd" | |
version: "14.0" | |
architecture: "x86_64" | |
run: | | |
make linux | |
make test |