Skip to content

🔬 Attempt to setup CI #2

🔬 Attempt to setup CI

🔬 Attempt to setup CI #2

name: Build and Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release, RelWithDebInfo]
include:
- os: windows-latest
cpp_compiler: cl
- os: ubuntu-latest
cpp_compiler: g++
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install conan cmake ninja
- name: Cache Conan packages
uses: actions/cache@v3
with:
path: ~/.conan2
key: ${{ runner.os }}-conan-${{ hashFiles('**/conanfile.txt') }}
restore-keys: |
${{ runner.os }}-conan-
- name: Install Conan Dependencies
run: |
conan install . --build=missing -s build_type=${{ matrix.build_type }}
- name: Set Build Directory
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build/${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"
- name: Configure CMake
run: >

Check failure on line 54 in .github/workflows/cmake-multi-platform.yml

View workflow run for this annotation

GitHub Actions / Build and Test

Invalid workflow file

The workflow is not valid. .github/workflows/cmake-multi-platform.yml (Line: 54, Col: 14): Unrecognized function: 'lower'. Located at position 1 within expression: lower(matrix.build_type)
cmake --preset conan-${{ lower(matrix.build_type) }}
-S .
-B ${{ steps.strings.outputs.build-output-dir }}
-G Ninja
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }}
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }}
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-${{ matrix.build_type }}-build
path: |
${{ steps.strings.outputs.build-output-dir }}/src/game/stabby*
${{ steps.strings.outputs.build-output-dir }}/src/game/stabby.exe
if-no-files-found: ignore