more organized file structure and install instructions #45
Workflow file for this run
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
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | |
name: test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
fail-fast: false | |
# CMake versions under test are the versions available int the supported | |
# lts versions of Ubuntu, and the latest version. | |
# Once support for a ubuntu version is dropped, the minimum cmake version of this | |
# project will be updated. | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
build_type: [Release, Debug] | |
cmake_version: ['3.16.3', # 20.04 LTS | |
'3.22.1', # 22.04 LTS | |
'3.28.3', # 24.04 LTS | |
'3.30'] | |
exclude: | |
- os: windows-latest | |
cmake_version: '3.16.3' # there seems to be a bug with compiler detection | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set reusable strings | |
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Setup cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: ${{ matrix.cmake_version }} | |
- name: Print CMake version | |
run: cmake --version | |
- name: setup python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install spdx-tools | |
run: | | |
python -m pip install --upgrade pip | |
pip install spdx-tools | |
- name: Configure CMake | |
run: > | |
cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-S ${{ github.workspace }} | |
env: | |
CMAKE_VERSION: ${{ matrix.cmake_version }} | |
- name: Install | |
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --target install | |
env: | |
CMAKE_VERSION: ${{ matrix.cmake_version }} |