chore: Add macOS build.

This commit is contained in:
iphydf 2021-12-28 23:25:34 +00:00
parent d8397c93c8
commit 8ce2ae0fcb
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
3 changed files with 32 additions and 36 deletions

View File

@ -13,6 +13,7 @@ branches:
required_status_checks: required_status_checks:
contexts: contexts:
- build-bootstrapd-docker - build-bootstrapd-docker
- build-macos
- build-nacl - build-nacl
- build-win32 - build-win32
- build-win64 - build-win64

View File

@ -44,3 +44,10 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Build on FreeBSD - name: Build on FreeBSD
run: .travis/cmake-freebsd-stage2 run: .travis/cmake-freebsd-stage2
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Build and test
run: .travis/cmake-osx

View File

@ -1,21 +1,16 @@
#!/bin/bash #!/bin/bash
ACTION="$1"
set -eu set -eu
CACHEDIR="$HOME/cache" CACHEDIR="$HOME/cache"
NPROC=$(sysctl -n hw.physicalcpu) NPROC=$(sysctl -n hw.physicalcpu)
travis_install() {
# Workaround for bug in Homebrew where it only finds an old Ruby version. # Workaround for bug in Homebrew where it only finds an old Ruby version.
brew update brew update
brew install libsodium libvpx opus libconfig brew install libconfig libsodium libvpx opus
}
travis_script() { . ".travis/flags-clang.sh"
. ".travis/flags-$CC.sh"
add_ld_flag -undefined error add_ld_flag -undefined error
@ -40,10 +35,3 @@ travis_script() {
make "-j$NPROC" test ARGS="-j50" || make "-j$NPROC" test ARGS="-j50" ||
make "-j$NPROC" test ARGS="-j50 --rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 make "-j$NPROC" test ARGS="-j50 --rerun-failed" CTEST_OUTPUT_ON_FAILURE=1
cd - # popd cd - # popd
}
if [ "-z" "$ACTION" ]; then
"travis_script"
else
"travis_$ACTION"
fi