Skip to content

Forgot to update path variables #142

Forgot to update path variables

Forgot to update path variables #142

Workflow file for this run

# This GitHub workflow file is meant to be a test for the template repo itself.
# You should replace it with your own workflow file for your project.
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022]
type: [exe, static, shared]
env:
CMAKE_ARGS: -DTEMPLATE_PROJECT_BUILD_DEMOS=1 -DTEMPLATE_PROJECT_BUILD_TESTS=1 -DTEMPLATE_PROJECT_USE_BUILD_TIMESTAMPS=1 -DTEMPLATE_PROJECT_DO_TEMPLATE_COMPONENT_TEST=1 -DTEMPLATE_PROJECT_CI_GIT_BRANCH_NAME="${{ github.ref_name }}"
CONFIGS: '{ "exe": "platform_config.exe.cmake", "static": "platform_config.static.cmake", "shared": "platform_config.shared.cmake" }'
steps:
- name: Checkout the source code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure
shell: bash
run: |
export PATH=$HOME/cmake/bin:$PATH
mkdir -p build
cd build
cmake --version
cmake .. $CMAKE_ARGS -DIDICMAKE_PLATFORM_CONFIG=../${{ fromJSON(env.CONFIGS)[matrix.type] }}
- name: Build
shell: bash
run: |
export PATH=$HOME/cmake/bin:$PATH
cd build
cmake --build . -j 8
- name: Test
shell: bash
run: |
export PATH=$HOME/cmake/bin:$PATH
cd build
ctest -C Debug --output-junit ctest.xml
- name: Upload Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: idi-cpp-template-${{ matrix.type }}-${{ matrix.os }}-${{ github.sha }}
path: build/ctest.xml