Skip to content

Commit 419b78e

Browse files
authored
Try to get Windows compiler warnings (#838)
* Try to get Windows compiler warnings * Add nuget * Enable verbose, remove some gha stuff * Fix vcpkg nuget
1 parent f2f855a commit 419b78e

1 file changed

Lines changed: 24 additions & 21 deletions

File tree

.github/workflows/pythonapp.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,29 @@ jobs:
2727
matrix:
2828
os: ["windows-2022", "ubuntu-latest", "macos-latest"]
2929
python-version: ["3.11", "3.12", "3.13", "3.14"]
30+
permissions:
31+
packages: write
32+
env:
33+
VCPKG_EXE: C:/vcpkg/vcpkg
34+
FEED_URL: https://nuget.pkg.github.com/FEniCS/index.json
35+
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/FEniCS/index.json,readwrite"
3036

3137
steps:
38+
- name: Add NuGet sources
39+
if: runner.os == 'Windows'
40+
shell: pwsh
41+
run: |
42+
.$(${{ env.VCPKG_EXE }} fetch nuget) `
43+
sources add `
44+
-Source "${{ env.FEED_URL }}" `
45+
-StorePasswordInClearText `
46+
-Name GitHubPackages `
47+
-UserName "${{ env.USERNAME }}" `
48+
-Password "${{ secrets.GITHUB_TOKEN }}"
49+
.$(${{ env.VCPKG_EXE }} fetch nuget) `
50+
setapikey "${{ secrets.GITHUB_TOKEN }}" `
51+
-Source "${{ env.FEED_URL }}"
52+
3253
- name: Checkout FFCx
3354
uses: actions/checkout@v6
3455

@@ -37,20 +58,6 @@ jobs:
3758
with:
3859
python-version: ${{ matrix.python-version }}
3960

40-
- name: Export GitHub Actions cache environment variables (Windows)
41-
if: runner.os == 'Windows'
42-
uses: actions/github-script@v9
43-
with:
44-
script: |
45-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
46-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
47-
48-
- name: Set up CMake
49-
if: runner.os == 'Windows'
50-
uses: lukka/get-cmake@latest
51-
with:
52-
cmakeVersion: "~3.30.0"
53-
5461
- name: Install dependencies (non-Python, Linux)
5562
if: runner.os == 'Linux'
5663
run: |
@@ -67,8 +74,6 @@ jobs:
6774
6875
- name: Install FEniCS dependencies (Python, Windows)
6976
if: runner.os == 'Windows'
70-
env:
71-
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
7277
run: |
7378
pip install git+https://github.com/FEniCS/ufl.git
7479
pip install -v git+https://github.com/FEniCS/basix.git --config-settings=cmake.args=-DINSTALL_RUNTIME_DEPENDENCIES=ON --config-settings=cmake.args=-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
@@ -90,7 +95,7 @@ jobs:
9095

9196
- name: Run unit tests
9297
run: >
93-
python -m pytest test/
98+
python -m pytest -vs test/
9499
-n auto
95100
-W error
96101
--cov=ffcx/
@@ -117,10 +122,8 @@ jobs:
117122
uses: ilammy/msvc-dev-cmd@v1
118123

119124
- name: Run FFCx demos
120-
run: >
121-
pytest demo/test_demos.py
122-
-W error
123-
# -n auto
125+
run: |
126+
pytest -vs demo/test_demos.py -W error
124127
125128
- name: Build documentation
126129
run: |

0 commit comments

Comments
 (0)