mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
chore: Add macOS build.
This commit is contained in:
parent
d8397c93c8
commit
8ce2ae0fcb
1
.github/settings.yml
vendored
1
.github/settings.yml
vendored
|
@ -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
|
||||||
|
|
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
@ -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
|
||||||
|
|
|
@ -1,28 +1,23 @@
|
||||||
#!/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
|
||||||
|
|
||||||
# Make compilation error on a warning
|
# Make compilation error on a warning
|
||||||
add_flag -Werror
|
add_flag -Werror
|
||||||
|
|
||||||
cmake -B_build -H. \
|
cmake -B_build -H. \
|
||||||
-DCMAKE_C_FLAGS="$C_FLAGS" \
|
-DCMAKE_C_FLAGS="$C_FLAGS" \
|
||||||
-DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
|
-DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
|
||||||
-DCMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
|
-DCMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
|
||||||
|
@ -35,15 +30,8 @@ travis_script() {
|
||||||
-DUSE_IPV6=OFF \
|
-DUSE_IPV6=OFF \
|
||||||
-DAUTOTEST=ON
|
-DAUTOTEST=ON
|
||||||
|
|
||||||
cd _build # pushd
|
cd _build # pushd
|
||||||
make "-j$NPROC" -k install
|
make "-j$NPROC" -k install
|
||||||
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
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user