diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 05215b9..2bca686 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -2,39 +2,43 @@ name: CodeQL on: pull_request: branches: [ "master" ] - + jobs: codeql: + runs-on: ubuntu-latest permissions: security-events: write packages: read - - strategy: + contents: read + + strategy: fail-fast: true - matrix: include: - language: c-cpp build-mode: manual - manual-command-list: > + manual-command-list: > cmake -S . -B ./build -G "Ninja Multi-Config" -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_FLAGS="-O3 -Wall -std=c++23" cmake --build ./build --config Release - + - language: actions build-mode: none - uses: VolcanusLucis/.github/.github/workflows/shared-codeql.yml@master - with: - language: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} - manual-command-list: ${{ matrix.manual-command-list }} - + steps: + - run: echo "Running CodeQL for ${{ matrix.language }}" + - name: Run CodeQL + uses: VolcanusLucis/.github/.github/actions/shared-codeql@master + with: + language: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + manual-command-list: ${{ matrix.manual-command-list }} + run-codeql: permissions: contents: none - + if: always() runs-on: ubuntu-latest needs: codeql @@ -43,4 +47,4 @@ jobs: - if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }} - run: exit 1 + run: exit 1 \ No newline at end of file diff --git a/.github/workflows/pr-xplat-build-test-autocomplete.yml b/.github/workflows/pr-xplat-build-test-autocomplete.yml deleted file mode 100644 index 942d195..0000000 --- a/.github/workflows/pr-xplat-build-test-autocomplete.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Cross-platform Builds Autocomplete -permissions: - contents: read - -on: - pull_request: - paths-ignore: - - 'libvlmath/**' - - 'toolchains/**' - - 'CMake**.**' - -jobs: - build: - uses: VolcanusLucis/.github/.github/workflows/build-cmake-project-presets.yml@master - with: - architecture: '' - build-tool: '' - build-type: '' - compiler: '' - target: '' - bypass: true - - build-all: - if: always() - runs-on: ubuntu-latest - steps: - - run: echo "No builds needed!" \ No newline at end of file diff --git a/.github/workflows/pr-xplat-build-test.yml b/.github/workflows/pr-xplat-build-test.yml index 3ae339e..db17e50 100644 --- a/.github/workflows/pr-xplat-build-test.yml +++ b/.github/workflows/pr-xplat-build-test.yml @@ -1,7 +1,4 @@ name: Cross-platform Builds -permissions: - contents: read - on: pull_request: branches: [ 'master' ] @@ -9,12 +6,38 @@ on: - 'libvlmath/**' - 'toolchains/**' - 'CMake**.**' - + jobs: + check-files: + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + files_found: ${{ steps.found-files.outputs.files_found }} + + steps: + - uses: actions/checkout@v4 + - id: changed-files + uses: tj-actions/changed-files@v47.0.1 + with: + base_sha: ${{ github.base_ref }} + files: | + libvlmath/** + toolchains/** + CMake**.** + - shell: bash + id: found-files + run: echo "files_found=${{ steps.changed-files.outputs.any_modified }}" >> $GITHUB_OUTPUT + build: + runs-on: ubuntu-latest + needs: check-files + if: ${{ needs.check-files.outputs.files_found }} + permissions: + contents: read + strategy: fail-fast: true - matrix: build-tool: [ ninja ] compiler: [ mingw64, gcc ] @@ -26,22 +49,24 @@ jobs: compiler: gcc - target: linux compiler: mingw64 - - uses: VolcanusLucis/.github/.github/workflows/build-cmake-project-presets.yml@master - with: - architecture: ${{ matrix.architecture }} - build-tool: ${{ matrix.build-tool }} - build-type: ${{ matrix.build-type }} - compiler: ${{ matrix.compiler }} - target: ${{ matrix.target }} + + steps: + - uses: VolcanusLucis/.github/.github/actions/build-cmake-project-presets@master + with: + architecture: ${{ matrix.architecture }} + build-tool: ${{ matrix.build-tool }} + build-type: ${{ matrix.build-type }} + compiler: ${{ matrix.compiler }} + target: ${{ matrix.target }} build-all: if: always() runs-on: ubuntu-latest - needs: build + needs: [check-files, build] steps: # https://github.com/orgs/community/discussions/26822 - - if: ${{ contains(needs.*.result, 'failure') - || contains(needs.*.result, 'cancelled') - || contains(needs.*.result, 'skipped') }} - run: exit 1 \ No newline at end of file + - if: contains(needs.*.result, 'failure') + || contains(needs.*.result, 'cancelled') + || (needs.check-files.outputs.files_found && contains(needs.*.results, 'skipped')) + run: exit 1 + \ No newline at end of file diff --git a/libvlmath/CMakeLists.txt b/libvlmath/CMakeLists.txt index 2051bb4..92e1fb4 100644 --- a/libvlmath/CMakeLists.txt +++ b/libvlmath/CMakeLists.txt @@ -3,6 +3,4 @@ ) target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_23) -target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_SOURCE_DIR}") - - +target_include_directories(${PROJECT_NAME} PUBLIC "${PROJECT_SOURCE_DIR}") \ No newline at end of file