Skip to content

Commit bf967b1

Browse files
committed
windows support ci
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 922990a commit bf967b1

File tree

2 files changed

+20
-68
lines changed

2 files changed

+20
-68
lines changed

.github/workflows/ci.yaml

Lines changed: 17 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151

5252
steps:
5353
- name: Run nox
54-
uses: frequenz-floss/gh-action-nox@v1.0.1
54+
uses: shsms/gh-action-nox@windows-support
5555
with:
5656
python-version: ${{ matrix.python }}
5757
nox-session: ${{ matrix.nox-session }}
@@ -102,87 +102,38 @@ jobs:
102102
- name: Setup Python
103103
uses: frequenz-floss/[email protected]
104104
with:
105-
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
105+
python-version: ${{ matrix.python }}
106106
dependencies: build
107107

108108
- name: Build the source and binary distribution
109109
run: python -m build
110110

111+
- name: Test installing wheel
112+
shell: bash
113+
run: |
114+
python --version
115+
python -m pip install dist/*.whl
116+
111117
- name: Upload distribution files
112118
uses: actions/upload-artifact@v5
113119
with:
114120
name: dist-packages-${{ matrix.platform.target }}-${{ matrix.python }}
115121
path: dist/
116122
if-no-files-found: error
117123

118-
test-installation:
119-
name: Test package installation
120-
needs: ["build"]
121-
strategy:
122-
fail-fast: false
123-
matrix:
124-
platform:
125-
- target: ubuntu-24.04
126-
- target: ubuntu-24.04-arm
127-
- target: windows-latest
128-
- target: macos-15-intel
129-
- target: macos-15
130-
python:
131-
- "3.11"
132-
- "3.12"
133-
- "3.13"
134-
- "3.14"
135-
runs-on: ${{ matrix.target }}
136-
137-
steps:
138-
- name: Setup Git
139-
uses: frequenz-floss/[email protected]
140-
141-
- name: Print environment (debug)
142-
run: env
143-
144-
- name: Download package
145-
uses: actions/download-artifact@v6
146-
with:
147-
name: dist-packages-${{ matrix.platform.target }}-${{ matrix.python }}
148-
path: dist
149-
150-
# This is necessary for the `pip` caching in the setup-python action to work
151-
- name: Fetch the pyproject.toml file for this action hash
152-
env:
153-
GH_TOKEN: ${{ github.token }}
154-
REPO: ${{ github.repository }}
155-
REF: ${{ github.sha }}
156-
run: |
157-
set -ux
158-
gh api \
159-
-X GET \
160-
-H "Accept: application/vnd.github.raw" \
161-
"/repos/$REPO/contents/pyproject.toml?ref=$REF" \
162-
> pyproject.toml
163-
164-
- name: Setup Python
165-
uses: frequenz-floss/[email protected]
166-
with:
167-
python-version: ${{ matrix.python }}
168-
dependencies: dist/*.whl
169-
170-
- name: Print installed packages (debug)
171-
run: python -m pip freeze
172-
173-
# This job runs if all the `test-installation` matrix jobs ran and succeeded.
124+
# This job runs if all the `build` matrix jobs ran and succeeded.
174125
# It is only used to have a single job that we can require in branch
175126
# protection rules, so we don't have to update the protection rules each time
176127
# we add or remove a job from the matrix.
177-
test-installation-all:
178-
# The job name should match the name of the `test-installation` job.
179-
name: Test package installation
180-
needs: ["test-installation"]
181-
# We skip this job only if test-installation was also skipped
182-
if: always() && needs.test-installation.result != 'skipped'
128+
build-all:
129+
# The job name should match the name of the `build` job.
130+
name: Build distribution packages
131+
needs: ["build"]
132+
# We skip this job only if build was also skipped
133+
if: always() && needs.build.result != 'skipped'
183134
runs-on: ubuntu-24.04
184135
env:
185-
DEPS_RESULT: ${{ needs.test-installation.result }}
136+
DEPS_RESULT: ${{ needs.build.result }}
186137
steps:
187138
- name: Check matrix job result
188139
run: test "$DEPS_RESULT" = "success"
@@ -222,7 +173,7 @@ jobs:
222173

223174
publish-docs:
224175
name: Publish documentation website to GitHub pages
225-
needs: ["nox-all", "test-installation-all"]
176+
needs: ["nox-all", "build-all"]
226177
if: github.event_name == 'push'
227178
runs-on: ubuntu-24.04
228179
permissions:

Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)