Skip to content

fixing bootstrap

fixing bootstrap #369

Workflow file for this run

# SPDX-FileCopyrightText: 2020-2024 Jochem Rutgers
#
# SPDX-License-Identifier: CC0-1.0
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
build-ubuntu:
strategy:
fail-fast: false
matrix:
gcc: [9, 10, 11, 12]
cxx: [C++03, C++11, C++14, C++17]
zmq: [zmq, nozmq]
include:
- gcc: 11
cxx: C++17
zmq: zmq
zth: zth
runs-on: ubuntu-22.04
env:
CC: gcc-${{matrix.gcc}}
CXX: g++-${{matrix.gcc}}
steps:
- name: checkout
uses: actions/checkout@v4
- name: bootstrap
run: |
sudo apt update
dist/ubuntu/bootstrap.sh
sudo apt install clang-tidy clang libegl1 cppcheck flawfinder
- name: build Debug
run: dist/ubuntu/build.sh Debug dev ${{matrix.cxx}} ${{matrix.zmq}} ${{matrix.zth}} test
- name: build Release
run: |
rm -rf dist/ubuntu/build
dist/ubuntu/build.sh Release ${{matrix.cxx}} ${{matrix.zmq}} ${{matrix.zth}} test
build-ubuntu-prev:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: bootstrap
run: |
sudo apt update
dist/ubuntu/bootstrap.sh
sudo apt install clang-tidy clang libegl1 cppcheck
- name: build Debug
run: dist/ubuntu/build.sh Debug dev test
- name: build Release
run: |
rm -rf dist/ubuntu/build
dist/ubuntu/build.sh Release test
build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
compiler: [msvc, gcc]
cxx: [C++03, C++11, C++14, C++17]
zmq: [zmq, nozmq]
exclude:
- compiler: msvc
cxx: C++03
- compiler: msvc
cxx: C++11
# Disabled, because GitHub now has mingw 12.2, which triggers the following error:
# https://sourceforge.net/p/mingw-w64/mailman/mingw-w64-public/thread/CAA2C%3DvBCHsSZX22LOfvtsN-YTJKNLYpTc96qwKUvufrg4Os7bw%40mail.gmail.com/#msg37674511
# TODO: fix this
# include:
# - compiler: gcc
# cxx: C++17
# zmq: zmq
# zth: zth
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: bootstrap
run: dist\win32\bootstrap.cmd
- name: build Debug
run: dist\win32\build.cmd Debug dev ${{matrix.compiler}} ${{matrix.cxx}} ${{matrix.zmq}} ${{matrix.zth}} test
- name: build Release
run: |
Remove-Item -path dist\win32\build -recurse -force
dist\win32\build.cmd Release ${{matrix.compiler}} ${{matrix.cxx}} ${{matrix.zmq}} ${{matrix.zth}} test
build-mac:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: bootstrap
run: dist/macos/bootstrap.sh
- name: venv
run: VENV_SKIP_PIP=1 dist/common/venv.sh install
- name: build Debug
run: dist/macos/build.sh Debug dev test
- name: build Release
run: |
rm -rf dist/macos/build
dist/macos/build.sh Release test
build-mingw:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: bootstrap
run: |
sudo apt update
dist/mingw/bootstrap.sh
sudo apt install libegl1
- name: build Debug
run: dist/mingw/build.sh Debug dev
- name: build Release
run: |
rm -rf dist/mingw/build
dist/mingw/build.sh Release
test-documentation:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: bootstrap
run: |
sudo apt update
dist/ubuntu/bootstrap.sh
sudo apt install libegl1
- name: build
run: dist/ubuntu/build.sh -DLIBSTORED_DOCUMENTATION=ON -DLIBSTORED_PYLIBSTORED=ON -DLIBSTORED_HAVE_ZTH=ON
# If everything is OK, publish documentation
documentation:
if: github.ref == 'refs/heads/master'
needs: [build-ubuntu, build-ubuntu-prev, build-windows, build-mac, build-mingw]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: bootstrap
run: |
sudo apt update
dist/ubuntu/bootstrap.sh
sudo apt install libegl1
- name: build
run: dist/ubuntu/build.sh -DLIBSTORED_DOCUMENTATION=ON -DLIBSTORED_PYLIBSTORED=ON -DLIBSTORED_HAVE_ZTH=ON
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/ubuntu/build/sphinx/_build/html
# Dummy job that depends on all other build-* jobs.
build-all-check:
needs: [build-ubuntu, build-ubuntu-prev, build-windows, build-mac, build-mingw, test-documentation]
runs-on: ubuntu-latest
if: success()
outputs:
success: ${{ steps.setoutput.outputs.success }}
steps:
- id: setoutput
run: echo "success=true" >> $GITHUB_OUTPUT
# Dummy job to check if build-all-check was successful.
build-all:
needs: [build-ubuntu, build-ubuntu-prev, build-windows, build-mac, build-mingw, test-documentation, build-all-check]
runs-on: ubuntu-latest
if: always()
steps:
- run: |
passed="${{ needs.build-all-check.outputs.success }}"
if [[ $passed == "true" ]]; then
echo "Build passed"
exit 0
else
echo "Build failed"
exit 1
fi