Skip to content

Install extra texlive packages before building the slides #769

Install extra texlive packages before building the slides

Install extra texlive packages before building the slides #769

name: Build exercises
on:
push:
paths:
- 'exercises/**'
pull_request:
paths:
- 'exercises/**'
- '.github/workflows/**'
# Cancel running jobs on force-push
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
jobs:
# Native (non-container) build jobs.
native:
# The "build matrix".
strategy:
matrix:
EXERCISE:
- NAME: "asan"
- NAME: "basicTypes"
- NAME: "callgrind"
- NAME: "concepts"
- NAME: "condition_variable"
- NAME: "constness"
SKIP_DEFAULT: true
SKIP_SOLUTION: true
- NAME: "control"
- NAME: "cppcheck"
- NAME: "debug"
- NAME: "functions"
- NAME: "helgrind"
- NAME: "hello"
SKIP_SOLUTION: true
- NAME: "loopsRefsAuto"
- NAME: "memcheck"
- NAME: "modern_oo"
- NAME: "move"
- NAME: "operators"
SKIP_DEFAULT: true
- NAME: "optional"
- NAME: "polymorphism"
- NAME: "python"
SKIP_SOLUTION: true
- NAME: "race"
- NAME: "smartPointers"
- NAME: "spaceship"
- NAME: "stl"
SKIP_DEFAULT: true
- NAME: "templates"
- NAME: "valgrind"
- NAME: "variadic"
SKIP_DEFAULT: true
- NAME: "variant"
- NAME: "virtual_inheritance"
PLATFORM:
- OS: "ubuntu-22.04"
GENERATOR: -G "Unix Makefiles"
env:
CXX: g++-11
# We temporarily need to hardcode macos-12, because "-latest" resolves to 11
- OS: "macos-12"
GENERATOR: -G "Xcode"
- OS: "windows-latest"
GENERATOR:
exclude:
- EXERCISE:
NAME: "helgrind"
PLATFORM:
OS: "windows-latest"
GENERATOR:
- EXERCISE:
NAME: "python"
SKIP_SOLUTION: true
PLATFORM:
OS: "windows-latest"
GENERATOR:
- EXERCISE:
NAME: "stl"
SKIP_DEFAULT: true
PLATFORM:
OS: "windows-latest"
GENERATOR:
- EXERCISE:
NAME: "stl"
SKIP_DEFAULT: true
PLATFORM:
OS: "macos-latest"
GENERATOR: -G "Xcode"
# The system to run on.
runs-on: ${{ matrix.PLATFORM.OS }}
# The build/test steps to execute.
steps:
# Use a standard checkout of the code.
- uses: actions/checkout@v4
# Run the CMake configuration.
- name: CMake Configure
run: cmake -S ${{ github.workspace }}/exercises/${{ matrix.EXERCISE.NAME }}
-B build
${{ matrix.PLATFORM.GENERATOR }}
# Perform the build of the "main exercise" with CMake.
- name: CMake Build Main
run: cmake --build build
if: ${{ !matrix.EXERCISE.SKIP_DEFAULT || false }}
# Perform the build of the "solution" with CMake.
- name: CMake Build Solution
run: cmake --build build --target solution
if: ${{ !matrix.EXERCISE.SKIP_SOLUTION || false }}
# Perform the build of the "main exercise" with GNU Make.
- name: GNU Make Build Main
run: make -C ${{ github.workspace }}/exercises/${{ matrix.EXERCISE.NAME }}
if: ${{ matrix.PLATFORM.OS != 'windows-latest' &&
(!matrix.EXERCISE.SKIP_DEFAULT || false) }}
# Perform the build of the "solution" with GNU Make.
- name: GNU Make Build Solution
run: make -C ${{ github.workspace }}/exercises/${{ matrix.EXERCISE.NAME }}
solution
if: ${{ matrix.PLATFORM.OS != 'windows-latest' &&
(!matrix.EXERCISE.SKIP_SOLUTION || false) }}