Skip to content

Commit

Permalink
Fix various things with the GitHub actions (#183)
Browse files Browse the repository at this point in the history
* Enable push trigger in test workflow and update ignored paths

Reinstated the push trigger for workflow runs on the "main" branch and significantly expanded the list of ignored paths. These updates optimize workflow execution by excluding files and directories unrelated to tests.

* Add MSYS2 setup and clean up redundant env variables

This commit adds MSYS2 to the path and sets a required environment variable for Windows builds. Additionally, it removes the redundant `VERBOSE` environment variable from the cmake configuration and build steps. These changes streamline and improve the build workflow for Windows runners.

* Set VCPKG_FORCE_SYSTEM_BINARIES in build env instead of CI env

Moved the `VCPKG_FORCE_SYSTEM_BINARIES` assignment from the CI environment setup to the build environment. This ensures the variable is only set where it's specifically needed, reducing scope and potential side effects.

* Remove commented-out MSBuild setup from GitHub workflow

The unused MSBuild setup lines were removed to clean up the workflow file. This improves readability and ensures only relevant configuration is retained. No functional changes were made.

* Remove redundant msys2 path setup in Windows CI workflow

The step to add msys2 to the PATH has been removed as it is no longer necessary. This simplifies the workflow and avoids unnecessary operations during the CI run.
  • Loading branch information
inakleinbottle authored Dec 13, 2024
1 parent 64cde66 commit f73f901
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,26 @@ name: tests

on:
workflow_dispatch:
# push:
# branches: [ "main" ]
# paths-ignore:
# - "examples/**"
# - "doc/**"
# - "README.md"
# - "*.txt"
# - "CHANGELOG"
# - "tools/*.py"
push:
branches: [ "main" ]
paths-ignore:
- "examples/**"
- "doc/**"
- "README.md"
- "CHANGELOG"
- "tools/*.py"
- ".github/workflows/build_wheels.yml"
- ".github/dependabot.yml"
- ".github/ISSUE_TEMPLATE/**"
- "branding/**"
- ".gitignore"
- "CMakePresets.json"
- "THANKS.txt"
- "LICENSE.txt"
- "VERSION.txt"
- "CITATION.cff"
- ".gitignore"

pull_request:
branches: [ "main" ]
paths-ignore:
Expand All @@ -30,6 +41,8 @@ on:
- "VERSION.txt"
- "CITATION.cff"
- ".gitignore"


env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
Expand Down Expand Up @@ -66,11 +79,6 @@ jobs:
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
# - uses: microsoft/[email protected]
# if: runner.os == 'Windows'
# with:
# msbuild-architecture: x64

- name: use ninja
shell: bash
run: |
Expand Down Expand Up @@ -116,15 +124,13 @@ jobs:
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DROUGHPY_BUILD_TESTS=ON -DROUGHPY_BUILD_PYMODULE_INPLACE=ON
env:
VERBOSE: 1
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/tools/vcpkg/scripts/buildsystems/vcpkg.cmake
MACOSX_DEPLOYMENT_TARGET: 11.0.0
VCPKG_FORCE_SYSTEM_BINARIES: 1

- name: Build
# Build your program with the given configuration
run: cmake --build ${{ github.workspace }}/build --config ${{env.BUILD_TYPE}}
env:
VERBOSE: 1

- name: Test
shell: bash
Expand Down

0 comments on commit f73f901

Please sign in to comment.