macos #85
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: macos | |
on: | |
workflow_dispatch: | |
jobs: | |
MacOS: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: [ | |
{ cc: gcc, cxx: g++ }, | |
{ cc: clang, cxx: clang++ }, | |
] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
submodules: true | |
- uses: actions/checkout@v4 | |
with: | |
repository: emscripten-core/emsdk | |
path: _/emsdk | |
- name: Run emsdk | |
run: | | |
_/emsdk/emsdk install latest | |
_/emsdk/emsdk activate latest | |
. _/emsdk/emsdk_env.sh | |
pushd _/emsdk/upstream/emscripten | |
$(dirname $EMSDK_NODE)/npm install | |
- name: Run setup | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
run: | | |
python3 -m venv _ | |
. _/bin/activate | |
python3 -m pip install ninja | |
python3 -m pip install -r requirements.txt | |
env | |
- name: Run cmake | |
env: | |
EMSDK_QUIET: 1 | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
CMAKE_PREFIX_PATH: ${{ github.workspace }}/_ | |
run: | | |
. _/bin/activate | |
. _/emsdk/emsdk_env.sh | |
set -x | |
cmake -S . -B build -G "Ninja Multi-Config" \ | |
-DCMAKE_INSTALL_PREFIX=_ \ | |
-DBUILD_TESTING=1 \ | |
-DLIBA_WARNINGS=1 \ | |
-DLIBA_ANALYZER=1 \ | |
-DLIBA_SANITIZE=1 \ | |
-DLIBA_JAVASCRIPT=1 \ | |
-DLIBA_JAVASCRIPT_TSGEN=1 \ | |
-DLIBA_JAVASCRIPT_BIGINT=1 \ | |
-DLIBA_WITH_LUA=1 \ | |
-DLIBA_PYTHON=1 \ | |
-DLIBA_JAVA=1 \ | |
-DLIBA_WITH_QUICKJS=1 \ | |
-DLIBA_LIBTOOL=1 \ | |
-DLIBA_PKGCONFIG=1 | |
- name: Run ninja | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
LIBA_OPENMP: ${{ startsWith(matrix.cc, 'gcc') }} | |
run: | | |
set -x | |
cmake --build build --config Debug --target package | |
- name: Run ctest | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
run: | | |
set -x | |
cmake --build build --config Debug --target test | |
- name: Run ninja | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
LIBA_OPENMP: ${{ startsWith(matrix.cc, 'gcc') }} | |
run: | | |
set -x | |
cmake --build build --config RelWithDebInfo --target package | |
- name: Run ctest | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
run: | | |
set -x | |
cmake --build build --config RelWithDebInfo --target test | |
- name: Run example | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
CMAKE_PREFIX_PATH: ${{ github.workspace }}/_ | |
run: | | |
set -x | |
cmake --build build --config RelWithDebInfo --target install | |
cmake -S example -B example/build | |
cmake --build example/build -v | |
- uses: actions/checkout@v4 | |
with: | |
repository: microsoft/vcpkg | |
path: _/vcpkg | |
- name: Run vcpkg | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
run: | | |
set -x | |
cmake -B build -DLIBA_VCPKG=_/vcpkg | |
_/vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
_/vcpkg/vcpkg install liba[ipo,pkgconfig] |