Skip to content

Commit

Permalink
Merge branch 'master' into fix_py311_mac_test_failures
Browse files Browse the repository at this point in the history
  • Loading branch information
bdbaddog authored May 19, 2024
2 parents 82363f0 + 04c5b6e commit d4176d4
Show file tree
Hide file tree
Showing 920 changed files with 23,749 additions and 15,577 deletions.
55 changes: 29 additions & 26 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,46 +17,48 @@ cache:
- C:\ProgramData\chocolatey\lib -> appveyor.yml

install:
# add python and python user-base to path for pip installs
# direct choco install supposed to work, but not? still doing in install.bat
#- cinst: dmd ldc swig vswhere ixsltproc winflexbison3
- cmd: .\.appveyor\install.bat
- cmd: if %COVERAGE% equ 1 .\.appveyor\install-cov.bat

# build matrix will be number of images multiplied by each '-' below,
# less any exclusions.
# split builds into sets of four jobs due to appveyor per-job time limit
# Leaving the Coverage build on VS2017 for build-time reasons (1hr time limit)
# Maybe move this one somewhere else in future to restore some flexibility.
# Build matrix will be number of images multiplied by #entries in matrix:,
# less any excludes.
#
# "Build" is kind of a misnomer - we are actually running the test suite,
# and this is slow on Windows, so keep the matrix as small as possible.
# Leaving the Coverage build on VS2017 for build-time reasons (1hr time limit).
# maybe move coverage to github in future to restore some flexibility?
environment:
# set COVERAGE to 1 for any builder that should run it
COVERAGE: 0
SCONS_CACHE_MSVC_CONFIG: "true"
matrix:

- WINPYTHON: "Python311"
COVERAGE: 0
# Test oldest and newest supported Pythons, and a subset in between.
# Skipping 3.7 and 3.9 at this time
- WINPYTHON: "Python312"

- WINPYTHON: "Python310"
COVERAGE: 0

- WINPYTHON: "Python38"
COVERAGE: 0

- WINPYTHON: "Python36"
COVERAGE: 1

# skipping 3.7 and 3.9 at this time
- WINPYTHON: "Python36"

# remove sets of build jobs based on criteria below
# to fine tune the number and platforms tested
matrix:
exclude:
# test python 3.6 on Visual Studio 2017 image
- image: Visual Studio 2017
WINPYTHON: "Python311"
WINPYTHON: "Python312"
- image: Visual Studio 2017
WINPYTHON: "Python310"
- image: Visual Studio 2017
WINPYTHON: "Python38"

# test python 3.8 on Visual Studio 2019 image
- image: Visual Studio 2019
WINPYTHON: "Python311"
WINPYTHON: "Python312"
- image: Visual Studio 2019
WINPYTHON: "Python310"
- image: Visual Studio 2019
Expand All @@ -68,30 +70,31 @@ matrix:
- image: Visual Studio 2022
WINPYTHON: "Python38"

# remove some binaries we don't want to be found
# Remove some binaries we don't want to be found
# Note this is no longer needed, git-windows bin/ is quite minimal now.
before_build:
- ps: .\.appveyor\ignore_git_bins.ps1

build: off

build_script:

# exclude VS 10.0 because it hangs the testing until this is resolved:
# https://help.appveyor.com/discussions/problems/19283-visual-studio-2010-trial-license-has-expired
- ps: .\.appveyor\disable_msvc_10.ps1
# Image version-based excludes:
# No excludes at the moment, but the exclude script generates the
# (possibly empty) exclude_list.txt which is used in the following step,
# so leave the scheme in place in case we need to put back excludes later.
- ps: .\.appveyor\exclude_tests.ps1

# setup coverage by creating the coverage config file, and adding coverage
# to the sitecustomize so that all python processes start with coverage
- ps: .\.appveyor\coverage_setup.ps1
- ps: if ($env:COVERAGE -eq 1) { .\.appveyor\coverage_setup.ps1 }

# NOTE: running powershell from cmd is intended because
# it formats the output correctly
- cmd: powershell -Command "& { if($env:COVERAGE -eq 1) { coverage run -p --rcfile=$($env:COVERAGE_PROCESS_START) runtest.py -j 2 -t --exclude-list exclude_list.txt -a } else { C:\\%WINPYTHON%\\python.exe runtest.py -j 2 -t --exclude-list exclude_list.txt -a }; if($LastExitCode -eq 2 -Or $LastExitCode -eq 0) { $host.SetShouldExit(0 )} else {$host.SetShouldExit(1)}}"

# run coverage even if there was a test failure
on_finish:
- ps: .\.appveyor\coverage_report.ps1
# running codecov in powershell causes an error so running in platform
# shells
- ps: if ($env:COVERAGE -eq 1) { .\.appveyor\coverage_report.ps1 }
# running codecov in powershell causes an error so running in cmd
- cmd: if %COVERAGE% equ 1 codecov -X gcov --file coverage_xml.xml

3 changes: 3 additions & 0 deletions .appveyor/disable_msvc_10.ps1 → .appveyor/exclude_tests.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
New-Item -Name exclude_list.txt -ItemType File;

# exclude VS 10.0 because it hangs the testing until this is resolved:
# https://help.appveyor.com/discussions/problems/19283-visual-studio-2010-trial-license-has-expired
$workaround_image = "Visual Studio 2015";
if ($env:APPVEYOR_BUILD_WORKER_IMAGE -eq $workaround_image) {
Add-Content -Path 'exclude_list.txt' -Value 'test\MSVS\vs-10.0-exec.py';
Expand Down
2 changes: 2 additions & 0 deletions .appveyor/install-cov.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
for /F "tokens=*" %%g in ('C:\\%WINPYTHON%\\python.exe -c "import sys; print(sys.path[-1])"') do (set PYSITEDIR=%%g)
C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off coverage codecov
9 changes: 5 additions & 4 deletions .appveyor/install.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
C:\\%WINPYTHON%\\python.exe --version
for /F "tokens=*" %%g in ('C:\\%WINPYTHON%\\python.exe -c "import sys; print(sys.path[-1])"') do (set PYSITEDIR=%%g)
REM use mingw 32 bit until #3291 is resolved
REM add python and python user-base to path for pip installs
set PATH=C:\\%WINPYTHON%;C:\\%WINPYTHON%\\Scripts;C:\\ProgramData\\chocolatey\\bin;C:\\MinGW\\bin;C:\\MinGW\\msys\\1.0\\bin;C:\\cygwin\\bin;C:\\msys64\\usr\\bin;C:\\msys64\\mingw64\\bin;%PATH%
C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off pip setuptools wheel
C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off coverage codecov
set STATIC_DEPS=true & C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off lxml

REM requirements-dev.txt will skip installing lxml for windows and py 3.11+, where there's
REM no current binary wheel
C:\\%WINPYTHON%\\python.exe -m pip install -U --progress-bar off -r requirements-dev.txt
REM install 3rd party tools to test with

choco install --allow-empty-checksums dmd ldc swig vswhere xsltproc winflexbison3
set SCONS_CACHE_MSVC_CONFIG=true
set
26 changes: 26 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# EditorConfig file for SCons project

root = true

[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8

[*.py]
max_line_length = 78
ensure_newline_before_comments = true
include_trailing_comma = true
use_parentheses = true

[*.xml]
indent_size = 2

[*.rst]
indent_size = 3

[*.bat]
end_of_line = crlf
10 changes: 7 additions & 3 deletions .github/workflows/experimental_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
matrix:
# note: in the 2nd half of 2022 the setup-mingw was often failing on
# windows-latest. revisit someday (perhaps when there's an @v3)
#os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
os: ['ubuntu-latest', 'windows-2019', 'macos-latest']

# The type of runner that the job will run on
Expand All @@ -31,16 +32,19 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.1

# experiment: maybe don't need this?
# update: looks like we do: with this commented out, the build hung
- name: Set up MinGW
uses: egor-tensin/setup-mingw@v2
uses: egor-tensin/setup-mingw@v2.2.0
if: matrix.os == 'windows-2019'
with:
platform: x64
static: 0

- name: Set up Python 3.11 ${{ matrix.os }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5.0.0
with:
python-version: '3.11'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/framework_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:

steps:
# Checkouut repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.1

- name: Set up Python 3.11 ${{ matrix.os }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5.0.0
with:
python-version: '3.11'

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/runtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.1

- name: Set up Python 3.10 ${{ matrix.os }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5.0.0
with:
python-version: '3.10'

Expand All @@ -46,7 +46,7 @@ jobs:
python runtest.py --all --time --jobs=2
- name: Archive Failed tests ${{ matrix.os }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3.1.3
with:
name: ${{ matrix.os }}-failed-tests
path: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scons-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.1

- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5.0.0
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade pip setuptools wheel build
#python -m pip install flake8 pytest
if [ -f requirements-pkg.txt ]; then pip install -r requirements-pkg.txt; elif [ -f requirements.txt ]; then pip install -r requirements.txt; fi
sudo apt-get update
Expand Down
Loading

0 comments on commit d4176d4

Please sign in to comment.