Skip to content

Commit b6a1469

Browse files
authored
Merge pull request SCons#4733 from jcbrill/jbrill-workflows-update
Workflows: Update github workflow files
2 parents 3795f93 + 212c8f3 commit b6a1469

File tree

13 files changed

+243
-68
lines changed

13 files changed

+243
-68
lines changed

.github/workflows/experimental_tests.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ on:
1414
workflow_dispatch:
1515

1616
env:
17-
# for use by the Windows runner (ignored by the others):
17+
# For use by the Windows runner (ignored by the others):
1818
SCONS_CACHE_MSVC_CONFIG: 1
1919

2020
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2121
jobs:
22-
# This workflow contains a single job called "build"
22+
# This workflow contains a single job called "experimental"
2323
experimental:
2424

2525
strategy:
@@ -28,11 +28,14 @@ jobs:
2828
# In the 2nd half of 2022 the setup-mingw was often failing on
2929
# windows-latest, when 2022 became the latest. Now 2025 is out,
3030
# and 2019 is being retired, we need some kind of a solution.
31-
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
32-
# os: ['ubuntu-latest', 'windows-2019', 'macos-latest']
31+
cfg: [
32+
{os: 'ubuntu-latest', args: ''},
33+
{os: 'windows-latest', args: ''},
34+
{os: 'macos-latest', args: '--exclude-list=testing/ci/macos_ci_skip.txt'},
35+
]
3336

3437
# The type of runner that the job will run on
35-
runs-on: ${{ matrix.os }}
38+
runs-on: ${{ matrix.cfg.os }}
3639

3740
# Steps represent a sequence of tasks that will be executed as part of the job
3841
steps:
@@ -48,25 +51,38 @@ jobs:
4851
# platform: x64
4952
# static: 0
5053

51-
- name: Set up MSYS2
54+
- name: Set up MSYS2 ${{ matrix.cfg.os }}
5255
uses: msys2/setup-msys2@v2
53-
if: matrix.os == 'windows-latest'
56+
if: startsWith(matrix.cfg.os, 'windows')
5457
with:
5558
msystem: UCRT64
5659
update: false
5760
install: git mingw-w64-ucrt-x86_64-gcc
5861

59-
- name: Set up Python 3.11 ${{ matrix.os }}
62+
- name: Set up Python 3.11 ${{ matrix.cfg.os }}
6063
uses: actions/setup-python@v5
6164
with:
6265
python-version: '3.11'
6366

64-
- name: Install dependencies including ninja ${{ matrix.os }}
67+
- name: Install dependencies including ninja ${{ matrix.cfg.os }}
6568
run: |
6669
python -m pip install --progress-bar off --upgrade pip
6770
python -m pip install --progress-bar off ninja psutil
6871
# sudo apt-get update
6972
70-
- name: Test experimental packages ${{ matrix.os }}
73+
- name: Populate MSVC cache ${{ matrix.cfg.os }}
74+
if: startsWith(matrix.cfg.os, 'windows')
7175
run: |
72-
python runtest.py test/import.py test/ninja
76+
python testing/ci/windows_msvc_cache.py
77+
78+
- name: Test experimental packages ${{ matrix.cfg.os }}
79+
run: |
80+
python runtest.py --time ${{ matrix.cfg.args }} test/import.py test/ninja
81+
82+
- name: Archive Failed tests ${{ matrix.cfg.os }}
83+
uses: actions/upload-artifact@v4
84+
if: failure()
85+
with:
86+
name: ${{ matrix.cfg.os }}-failed-tests
87+
path: |
88+
failed_tests.log
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Test MSVC Optional Environment
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the master branch
8+
push:
9+
branches: [ master ]
10+
pull_request:
11+
branches: [ master ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
env:
17+
SCONS_CACHE_MSVC_CONFIG: 1
18+
SCONS_CACHE_MSVC_FORCE_DEFAULTS: 1
19+
POWERSHELL_TELEMETRY_OPTOUT: 1
20+
PSDisableModuleAnalysisCacheCleanup: 1
21+
VCPKG_DISABLE_METRICS: 1
22+
VSCMD_SKIP_SENDTELEMETRY: 1
23+
24+
jobs:
25+
runtest-msvc:
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
os: ['windows-latest']
30+
31+
runs-on: ${{ matrix.os }}
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Set up Python 3.12 ${{ matrix.os }}
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.12'
40+
cache: 'pip'
41+
42+
- name: Install Python dependencies ${{ matrix.os }}
43+
run: |
44+
python -m pip install --progress-bar off --upgrade pip
45+
python -m pip install --progress-bar off -r requirements-dev.txt
46+
47+
- name: runtest ${{ matrix.os }}
48+
run: |
49+
python runtest.py --file=testing/ci/msvc_ci_run.txt --time
50+
51+
- name: Display MSVC cache ${{ matrix.os }}
52+
if: always()
53+
run: |
54+
python testing/ci/windows_msvc_cache.py --skip-populate
55+
56+
- name: Archive Failed tests ${{ matrix.os }}
57+
uses: actions/upload-artifact@v4
58+
if: failure()
59+
with:
60+
name: ${{ matrix.os }}-failed-tests
61+
path: |
62+
failed_tests.log

.github/workflows/runtest-win.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,43 @@ env:
1818

1919
jobs:
2020
runtest-win32:
21-
runs-on: windows-latest
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os: ['windows-latest']
25+
26+
runs-on: ${{ matrix.os }}
27+
2228
steps:
2329
- uses: actions/checkout@v4
2430

25-
- name: Set up Python 3.12
31+
- name: Set up Python 3.12 ${{ matrix.os }}
2632
uses: actions/setup-python@v5
2733
with:
2834
python-version: '3.12'
2935
cache: 'pip'
3036

31-
- name: Install Python dependencies
37+
- name: Install Python dependencies ${{ matrix.os }}
3238
run: |
3339
python -m pip install --progress-bar off --upgrade pip
3440
python -m pip install --progress-bar off -r requirements-dev.txt
3541
36-
- name: Install Chocolatey packages
42+
- name: Install Chocolatey packages ${{ matrix.os }}
3743
run: |
3844
choco install --yes --no-progress dmd winflexbison3
3945
40-
- name: runtest
46+
- name: Populate MSVC cache ${{ matrix.os }}
47+
run: |
48+
python testing/ci/windows_msvc_cache.py
49+
50+
- name: runtest ${{ matrix.os }}
4151
run: |
42-
python runtest.py --all --exclude-list=windows_ci_skip.txt --time --jobs=4
52+
python runtest.py --all --exclude-list=testing/ci/windows_ci_skip.txt --time --jobs=4
4353
44-
- name: Archive Failed tests
54+
- name: Archive Failed tests ${{ matrix.os }}
4555
uses: actions/upload-artifact@v4
56+
if: failure()
4657
with:
47-
name: windows-failed-tests
58+
name: ${{ matrix.os }}-failed-tests
4859
path: |
4960
failed_tests.log

.github/workflows/runtest.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,38 +20,42 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
os: ['ubuntu-22.04', 'ubuntu-24.04']
23+
cfg: [
24+
{os: 'ubuntu-22.04', py: '3.7'},
25+
{os: 'ubuntu-24.04', py: '3.13'},
26+
]
2427

25-
runs-on: ${{ matrix.os }}
28+
runs-on: ${{ matrix.cfg.os }}
2629

2730
steps:
2831
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2932
- uses: actions/checkout@v4
3033

31-
- name: Install Ubuntu packages $${matrix.os}}
34+
- name: Install Ubuntu packages ${{ matrix.cfg.os }}
3235
run: |
3336
sudo apt-get update
3437
sudo apt-get install libtirpc-dev
3538
36-
- name: Set up Python 3.12 ${{ matrix.os }}
39+
- name: Set up Python ${{ matrix.cfg.py }} ${{ matrix.cfg.os }}
3740
uses: actions/setup-python@v5
3841
with:
39-
python-version: '3.12'
42+
python-version: ${{ matrix.cfg.py }}
4043
cache: 'pip'
4144

42-
- name: Install Python dependencies ${{ matrix.os }}
45+
- name: Install Python ${{ matrix.cfg.py }} dependencies ${{ matrix.cfg.os }}
4346
run: |
4447
python -m pip install --progress-bar off --upgrade pip
4548
python -m pip install --progress-bar off -r requirements-dev.txt
4649
# sudo apt-get update
4750
48-
- name: runtest ${{ matrix.os }}
51+
- name: runtest ${{ matrix.cfg.os }} ${{ matrix.cfg.py }}
4952
run: |
5053
python runtest.py --all --time --jobs=4
5154
52-
- name: Archive Failed tests ${{ matrix.os }}
55+
- name: Archive Failed tests ${{ matrix.cfg.os }} ${{ matrix.cfg.py }}
5356
uses: actions/upload-artifact@v4
57+
if: failure()
5458
with:
55-
name: ${{ matrix.os }}-failed-tests
59+
name: ${{ matrix.cfg.os }}-${{ matrix.cfg.py }}-failed-tests
5660
path: |
5761
failed_tests.log

CHANGES.txt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,35 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
4545
environment used by SCons to initialize MSVC when defined. None of
4646
these variables and values are propagated to the user's SCons
4747
environment after running the MSVC batch files.
48+
- GitHub workflow changes:
49+
* Add directory testing/ci for test runner files. Move the existing
50+
windows ci skip file from the SCons root to the ci testing directory.
51+
* Remove the interactive tests from the windows ci skip file.
52+
* Add an exclude test file for MacOS that skips the two ninja tests that
53+
consistently fail.
54+
* Add a test file containing one test for the MSVC optional environment
55+
workflow.
56+
* Modify the experimental workflow to pass the exclude test file as an
57+
argument to the test runner for macos.
58+
* Add a workflow file to test MSVC with the optional environment
59+
variables.
60+
* Add a script in the testing/ci directory to populate the MSVC
61+
cache before running the test suite in select windows workflow files.
62+
The experimental test suite and the full test suite workflow files
63+
populate the MSVC cache before running the test suite on windows. The
64+
script is also run after the test suite in the optional MSVC
65+
environment variables workflow file to display the MSVC cache.
66+
* Upload the failed_tests.log artifact on failure in select workflow
67+
files. Prior to this change, the failed test log was uploaded only
68+
when none of the tests failed.
69+
* Modify the runtest workflow file to pair an OS version with a python
70+
version.
71+
- Ninja: Increase the number of generated source files in the ninja
72+
iterative speedup test from 200 to 250. Increasing the workload should
73+
reduce the likelihood that the ninja tests are slower.
74+
- Testing: Increase the default timeout from 20 seconds to 60
75+
seconds in the testing framework wait_for method. At present, the
76+
wait_for method is only used for the interactive tests.
4877

4978
From Edward Peek:
5079
- Fix the variant dir component being missing from generated source file

RELEASE.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,34 @@ DEVELOPMENT
139139
expectations for bytecode strings and error message contents; there was
140140
no problem with SCons itself using 3.14.
141141

142+
- Move the GitHub workflow test runner files from the SCons root to
143+
the ci subdirectory of the testing directory.
144+
145+
- GitHub: Enable the interactive tests on windows.
146+
147+
- GitHub: Exclude two ninja tests that consistently fail on MacOS in
148+
the experimental tests workflow.
149+
150+
- GitHub: Add a workflow file to test MSVC with optional environment
151+
variables.
152+
153+
- GitHub: Populate the MSVC cache before running the test suite for
154+
select windows workflow files.
155+
156+
- GitHub: Upload the failed_tests.log artifact on failure in select
157+
workflow files.
158+
159+
- GitHub: Change the runtest workflow to allow the python version to
160+
be specified with the OS version.
161+
162+
- Testing: Increase the default timeout from 20 seconds to 60 seconds
163+
in the testing framework wait_for method. The timeout was increased
164+
during isolated experiments of the interactive tests on windows.
165+
166+
- Ninja: Increase the number of generated source files in the
167+
iterative speedup test from 200 to 250. Increasing the workload
168+
should reduce the likelihood that the ninja tests are slower.
169+
142170
Thanks to the following contributors listed below for their contributions to this release.
143171
==========================================================================================
144172
.. code-block:: text

test/ninja/iterative_speedup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def mod_source_orig(test_num):
144144
""" % locals())
145145

146146

147-
num_source = 200
147+
num_source = 250
148148
for i in range(1, num_source + 1):
149149
generate_source(i - 1, i)
150150

testing/ci/macos_ci_skip.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# temporarily skip this in GitHub MacOS Experimental runner
2+
test/ninja/ninja_handle_control_c_rebuild.py
3+
test/ninja/shutdown_scons_daemon.py

testing/ci/msvc_ci_run.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test/MSVC/msvc.py

testing/ci/windows_ci_skip.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# temporarily skip this in GitHub Windows runner
2+
test/CPPDEFINES/pkg-config.py
3+
test/packaging/msi/explicit-target.py
4+
test/packaging/msi/file-placement.py
5+
test/packaging/msi/package.py
6+
test/packaging/tar/xz_packaging.py
7+
test/scons-time/run/config/python.py
8+
test/scons-time/run/option/python.py
9+
test/sconsign/script/no-SConsignFile.py
10+
test/sconsign/script/SConsignFile.py
11+
test/sconsign/script/Signatures.py

0 commit comments

Comments
 (0)