Skip to content

Add thread test workflow #296

Add thread test workflow

Add thread test workflow #296

# This workflow will thoroughly test the build system
name: Complete build system test
on:
push:
branches: '**'
pull_request:
branches: '**'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install --no-install-recommends make pkg-config build-essential
sudo apt-get install --no-install-recommends g++-12 libgomp1 clang-17 libomp-17-dev
sudo apt-get install --no-install-recommends inkscape optipng
sudo apt-get install --no-install-recommends libglm-dev libglfw3-dev libglew-dev libstb-dev libassimp-dev
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10000
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-17 10000
sudo update-alternatives --set g++ /usr/bin/g++-12
sudo update-alternatives --set clang++ /usr/bin/clang++-17
- name: Test icon generation target
run: |
make icons
- name: (g++) Test shared library build target
run: |
CXX="g++" make library -j$(nproc)
- name: (g++) Test demo build target
run: |
CXX="g++" make build -j$(nproc)
- name: (g++) Test debug demo build target
run: |
CXX="g++" make debug -j$(nproc)
- name: (g++) Check built objects are present
run: |
ls build/demo build/libammonite.so
- name: Clean build area
run: |
make clean
- name: (clang++) Test shared library build target
run: |
CXX="clang++" make library -j$(nproc)
- name: (clang++) Test demo build target
run: |
CXX="clang++" make build -j$(nproc)
- name: (clang++) Test debug demo build target
run: |
CXX="clang++" make debug -j$(nproc)
- name: (clang++) Check built objects are present
run: |
ls build/demo build/libammonite.so
- name: Test library install target
run: |
sudo make install
- name: Test headers install target
run: |
sudo make headers