chore(deps): pre-commit.ci autoupdate (#27) #78
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: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
cpp: | |
runs-on: ubuntu-latest | |
container: makeappdev/cpp-dev | |
strategy: | |
matrix: | |
include: | |
- compiler: gcc | |
- compiler: clang | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build ${{ matrix.compiler }} | |
run: | | |
use_${{ matrix.compiler }}.sh | |
mkdir -p build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=Debug .. | |
make -j8 | |
make test | |
make coverage | |
cd .. | |
- uses: actions/upload-artifact@v3 | |
if: ${{ matrix.compiler }} == 'gcc' | |
with: | |
path: build/ccov/all-merged | |
name: artifacts-cpp | |
python: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Tests | |
run: make test | |
- name: Coverage | |
run: make coverage_reports | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: tools/htmlcov | |
name: artifacts-python | |
AsciiDoc: | |
runs-on: ubuntu-latest | |
container: asciidoctor/docker-asciidoctor:latest | |
steps: | |
- name: Install rsync | |
run: apk add rsync | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
cd docs | |
make html | |
make pdf | |
cd .. | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: docs/output | |
name: artifacts-docs | |
slides: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
mkdir -p build && chmod -R 0777 build | |
make slides | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: slides/build | |
name: artifacts-slides | |
deploy: | |
needs: | |
- cpp | |
- python | |
- AsciiDoc | |
- slides | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download all workflow run artifacts | |
uses: actions/download-artifact@v3 | |
- name: Prepare Deploy | |
run: | | |
mkdir -p public | |
mv artifacts-slides/* public | |
mv artifacts-docs/* public | |
mkdir -p public/coverage | |
mv artifacts-cpp public/coverage/cpp | |
mv artifacts-python/ public/coverage/python | |
mkdir -p public/export | |
make package | |
mv export/*.zip public/export | |
make solution_package | |
mv export/*.zip public/export | |
echo "# This branch is for deployment only" >> public/README.md | |
- name: Deploy Artifacts | |
if: github.ref == 'refs/heads/master' | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: public | |
single-commit: true | |
silent: true |