Main Workflow #81
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: Main Workflow | |
on: | |
- push | |
- workflow_dispatch | |
jobs: | |
build-gcc: | |
name: Build GCC | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
gcc-version: [7, 8, 9, 10, 11, 12, 13] | |
runs-on: ubuntu-latest | |
container: gcc:${{ matrix.gcc-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Viriatum | |
run: | | |
./autogen.sh | |
./configure | |
make | |
- name: Test Viriatum | |
run: | | |
./src/viriatum/viriatum --test | |
build-clang: | |
name: Build Clang | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
clang-version: [4, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17] | |
runs-on: ubuntu-latest | |
container: silkeh/clang:${{ matrix.clang-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Viriatum | |
run: | | |
apt-get update && apt-get install -y -q libtool automake autoconf | |
./autogen.sh | |
CC=clang ./configure | |
make | |
- name: Test Viriatum | |
run: | | |
./src/viriatum/viriatum --test | |
build-gcc-cmake: | |
name: Build GCC CMake | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
gcc-version: [7, 8, 9, 10, 11, 12, 13] | |
cmake-version: ["3.25.0"] | |
cmake-type: ["binary"] | |
runs-on: ubuntu-latest | |
container: gcc:${{ matrix.gcc-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install CMake | |
run: | | |
apt-get update && apt-get install -y -q wget libssl-dev | |
wget https://github.com/Kitware/CMake/releases/download/v${{ matrix.cmake-version }}/cmake-${{ matrix.cmake-version }}-linux-x86_64.tar.gz && tar -zxvf cmake-${{ matrix.cmake-version }}-linux-x86_64.tar.gz && cd cmake-${{ matrix.cmake-version }}-linux-x86_64 && ln -s $(pwd)/bin/cmake /usr/local/bin/cmake | |
if: matrix.cmake-type == 'binary' | |
- name: Build & Install CMake | |
run: | | |
apt-get update && apt-get install -y -q wget libssl-dev | |
wget https://ftp.osuosl.org/pub/blfs/conglomeration/cmake/cmake-${{ matrix.cmake-version }}.tar.gz && tar -zxvf cmake-${{ matrix.cmake-version }}.tar.gz && cd cmake-${{ matrix.cmake-version }} && ./bootstrap && make && make install | |
if: matrix.cmake-type == 'source' | |
- name: Build & Install Dependencies | |
run: | | |
apt-get update && apt-get install -y -q wget python3 python3-dev libpng-dev | |
wget https://bootstrap.pypa.io/pip/get-pip.py && PIP_BREAK_SYSTEM_PACKAGES=1 python3 get-pip.py | |
pip3 install --break-system-packages --upgrade "conan<2" urllib3 | |
conan install . --build | |
- name: Build Viriatum | |
run: | | |
cmake . | |
make | |
- name: Test Viriatum | |
run: | | |
ls -la | |
./bin/viriatum --test | |
build-windows-cmake: | |
name: Build Windows CMake | |
timeout-minutes: 30 | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build & Install Dependencies | |
run: | | |
pip3 install --upgrade "conan<2" urllib3 | |
conan install . --build | |
- name: Setup msbuild | |
uses: microsoft/[email protected] | |
- name: Build Viriatum | |
run: | | |
cmake . -DCMAKE_CL_64=1 -DCMAKE_GENERATOR_PLATFORM=x64 -Ax64 | |
msbuild ALL_BUILD.vcxproj /P:Configuration=Release | |
- name: Test Viriatum | |
run: | | |
bin/viriatum --test | |
build-macos-cmake: | |
name: Build macOS CMake | |
timeout-minutes: 30 | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build & Install Dependencies | |
run: | | |
export PATH=$PATH:/Library/Frameworks/Python.framework/Versions/2.7/bin | |
pip3 install --upgrade "conan>1.50.0, <2" "urllib3<1.27" | |
conan install . --build | |
- name: Build Viriatum | |
run: | | |
cmake . | |
make | |
- name: Test Viriatum | |
run: | | |
./bin/viriatum --test |