Try vm-actions instead of cross-platform-actions (#589)
This uses VirtualBox instead of xhyve. It might be slower, but should be more reliable. Tests run on FreeBSD, NetBSD, and OpenBSD. Only the FreeBSD ones are passing at the moment, the others will keep running but aren't added as dependencies for the action used to guard commits.
This commit is contained in:
106
.github/workflows/main.yml
vendored
106
.github/workflows/main.yml
vendored
@@ -110,54 +110,104 @@ jobs:
|
||||
|
||||
# GitHub doesn't natively support *BSD, but we can run them in VMs on Mac /
|
||||
# Linux runners
|
||||
bsd:
|
||||
freebsd:
|
||||
strategy:
|
||||
matrix:
|
||||
# Build each combination of OS, version, and release/debug variants
|
||||
# FreeBSD and OpenBSD run on xhyve, netbsd needs qemu
|
||||
os:
|
||||
- name: freebsd
|
||||
version: '13.1'
|
||||
host: macos-12
|
||||
- version: '13.1'
|
||||
dependencies: pkg ins -y cmake ninja
|
||||
enabled: true
|
||||
- name: freebsd
|
||||
version: '12.4'
|
||||
host: macos-12
|
||||
- version: '12.3'
|
||||
dependencies: pkg ins -y cmake ninja
|
||||
enabled: true
|
||||
# Tests are failing on OpenBSD, so disable for now.
|
||||
#- name: openbsd
|
||||
# version: '7.2'
|
||||
# host: macos-12
|
||||
# dependencies: pkg_add -I cmake ninja
|
||||
# NetBSD fails to produce any output in 25 minutes, so disable for now.
|
||||
#- name: netbsd
|
||||
# version: '9.2'
|
||||
# host: ubuntu-latest
|
||||
# dependencies: pkgin -y install cmake ninja
|
||||
build-type: [ Release, Debug ]
|
||||
# Don't abort runners if a single one fails
|
||||
fail-fast: false
|
||||
# Kill these jobs if they take too long.
|
||||
timeout-minutes: 25
|
||||
runs-on: ${{ matrix.os.host }}
|
||||
name: ${{ matrix.os.name }}-${{ matrix.os.version}} ${{ matrix.build-type }}
|
||||
runs-on: macos-latest
|
||||
name: FreeBSD-${{ matrix.os.version}} ${{ matrix.build-type }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cross-platform-actions/action@v0.10.0
|
||||
- uses: vmactions/freebsd-vm@v0
|
||||
with:
|
||||
operating_system: ${{ matrix.os.name }}
|
||||
architecture: x86-64
|
||||
version: ${{ matrix.os.version}}
|
||||
shell: bash
|
||||
release: ${{ matrix.os.version}}
|
||||
usesh: true
|
||||
mem: 8192
|
||||
copyback: false
|
||||
prepare: |
|
||||
${{ matrix.os.dependencies }}
|
||||
run: |
|
||||
sudo ${{ matrix.os.dependencies }}
|
||||
set -e
|
||||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -G Ninja
|
||||
cd ${{github.workspace}}/build
|
||||
NINJA_STATUS="%p [%f:%s/%t] %o/s, %es" ninja
|
||||
ctest -j 4 --output-on-failure -E '(perf-.*)|(.*-malloc$)' --timeout 400
|
||||
|
||||
netbsd:
|
||||
strategy:
|
||||
matrix:
|
||||
# Build each combination of OS, version, and release/debug variants
|
||||
# FreeBSD and OpenBSD run on xhyve, netbsd needs qemu
|
||||
os:
|
||||
- version: '9.2'
|
||||
dependencies: |
|
||||
pkg_add cmake ninja-build gcc10
|
||||
build-type: [ Release, Debug ]
|
||||
# Don't abort runners if a single one fails
|
||||
fail-fast: false
|
||||
# Kill these jobs if they take too long.
|
||||
timeout-minutes: 25
|
||||
runs-on: macos-latest
|
||||
name: NetBSD-${{ matrix.os.version}} ${{ matrix.build-type }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: vmactions/netbsd-vm@v0
|
||||
with:
|
||||
release: ${{ matrix.os.version}}
|
||||
usesh: true
|
||||
mem: 8192
|
||||
copyback: false
|
||||
prepare: |
|
||||
${{ matrix.os.dependencies }}
|
||||
run: |
|
||||
set -e
|
||||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -G Ninja -DCMAKE_CXX_COMPILER=/usr/pkg/gcc10/bin/g++ -DCMAKE_C_COMPILER=/usr/pkg/gcc10/bin/gcc
|
||||
cd ${{github.workspace}}/build
|
||||
NINJA_STATUS="%p [%f:%s/%t] %o/s, %es" ninja
|
||||
ctest -j 4 --output-on-failure -E '(perf-.*)|(.*-malloc$)' --timeout 400
|
||||
|
||||
openbsd:
|
||||
strategy:
|
||||
matrix:
|
||||
# Build each combination of OS, version, and release/debug variants
|
||||
os:
|
||||
- version: '7.2'
|
||||
dependencies: pkg_add -I cmake ninja
|
||||
build-type: [ Release, Debug ]
|
||||
# Don't abort runners if a single one fails
|
||||
fail-fast: false
|
||||
# Kill these jobs if they take too long.
|
||||
timeout-minutes: 25
|
||||
runs-on: macos-latest
|
||||
name: OpenBSD-${{ matrix.os.version}} ${{ matrix.build-type }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: vmactions/openbsd-vm@v0
|
||||
with:
|
||||
release: ${{ matrix.os.version}}
|
||||
usesh: true
|
||||
mem: 8192
|
||||
copyback: false
|
||||
prepare: |
|
||||
${{ matrix.os.dependencies }}
|
||||
run: |
|
||||
set -e
|
||||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -G Ninja
|
||||
cd ${{github.workspace}}/build
|
||||
NINJA_STATUS="%p [%f:%s/%t] %o/s, %es" ninja
|
||||
ctest -j 4 --output-on-failure -E '(perf-.*)|(.*-malloc$)' --timeout 400
|
||||
|
||||
sanitizer:
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -368,7 +418,7 @@ jobs:
|
||||
fi
|
||||
|
||||
all-checks:
|
||||
needs: [linux, bsd, qemu-crossbuild, windows, format, sanitizer]
|
||||
needs: [linux, freebsd, qemu-crossbuild, windows, format, sanitizer]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dummy step
|
||||
|
||||
Reference in New Issue
Block a user