Skip to content

Migrate to abcg v3.1.1 #23

Migrate to abcg v3.1.1

Migrate to abcg v3.1.1 #23

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
linux-build:
runs-on: ubuntu-latest
env:
BUILD_TYPE: Release
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get install cmake pkg-config
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev libxcb-cursor-dev
sudo apt-get install python3 pip
pip install "conan<2.0"
- name: Install GCC
run: |
echo "CC=/usr/bin/gcc-13" >> $GITHUB_ENV
echo "CXX=/usr/bin/g++-13" >> $GITHUB_ENV
sudo update-alternatives --remove-all cc
sudo update-alternatives --remove-all c++
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get install -y gcc-13 g++-13
sudo update-alternatives --install /usr/bin/cc gcc /usr/bin/gcc-13 1000 \
--slave /usr/bin/c++ g++ /usr/bin/g++-13
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_C_COMPILER=${{env.CC}} -DCMAKE_CXX_COMPILER=${{env.CXX}} \
-DENABLE_UNIT_TESTING=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j $(nproc)
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
macOS-build:
runs-on: macos-latest
env:
BUILD_TYPE: Release
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- run: |
python -m pip install --upgrade pip
pip install wheel
- name: Install dependencies
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install glew sdl2 sdl2_image
- name: Install LLVM
run: |
echo "CC=/usr/local/cellar/llvm@16/16.0.6/bin/clang" >> $GITHUB_ENV
echo "CXX=/usr/local/cellar/llvm@16/16.0.6/bin/clang++" >> $GITHUB_ENV
brew install llvm@16
- name: Install Conan
id: conan
uses: turtlebrowser/get-conan@main
with:
version: 1.60.2
- name: Create default Conan profile
run: |
conan profile new default --detect
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_C_COMPILER=${{env.CC}} -DCMAKE_CXX_COMPILER=${{env.CXX}} \
-DENABLE_UNIT_TESTING=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j $(sysctl -n hw.ncpu)
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
windows-build:
runs-on: windows-latest
env:
BUILD_TYPE: Release
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- run: |
python -m pip install --upgrade pip
pip install wheel
- name: Install Conan
run: pip install "conan<2.0"
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_UNIT_TESTING=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
wasm-build:
runs-on: ubuntu-latest
env:
BUILD_TYPE: Release
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Emscripten
run: |
sudo apt-get install git cmake
sudo apt-get install python3 pip
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
- name: Configure CMake
run: |
source ./emsdk/emsdk_env.sh
emcmake cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build - ${{matrix.build-type}}
run: |
source ./emsdk/emsdk_env.sh
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -- -j $(nproc)