switch to pinned dependencies for all GitHub actions (#364) #374
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: build | |
permissions: | |
contents: read | |
on: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
branches: | |
- main | |
env: | |
BUILD_TYPE: RelWithDebInfo | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Check Tabs | |
run: | | |
if git grep -n $'\t' *.cpp *.c *.hpp *.h; then echo 'Please replace tabs with spaces in source files.'; false; fi | |
- name: Check Whitespace | |
run: | | |
if git grep -n '[[:blank:]]$' *.cpp *.c *.hpp *.h; then echo 'Please remove trailing whitespace from source files.'; false; fi | |
build: | |
needs: check | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- name: Create Build Directory | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Run CMake | |
shell: bash | |
working-directory: ${{runner.workspace}}/build | |
run: cmake -DENABLE_CLILOADER=1 -DCMAKE_BUILD_TYPE=$BUILD_TYPE $GITHUB_WORKSPACE | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
shell: bash | |
run: cmake --build . --parallel 4 --config $BUILD_TYPE | |
#- name: Test | |
# working-directory: ${{runner.workspace}}/build | |
# shell: bash | |
# run: ctest -C $BUILD_TYPE |