Skip to content

Commit

Permalink
Merge branch 'master' into rewriter-newnodes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Sep 27, 2024
2 parents 5fdf7d7 + 1aac6cc commit d8bf7e3
Show file tree
Hide file tree
Showing 823 changed files with 13,165 additions and 4,982 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
# bypass cache: https://github.com/github/codeql-action/issues/1445
tools: latest
tools: linked
config-file: .github/codeql/codeql-config.yml
languages: python
# we have none
setup-python-dependencies: false

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
11 changes: 7 additions & 4 deletions .github/workflows/cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ on:
paths:
- "mesonbuild/**"
- "test cases/**"
- "unittests/**"
- ".github/workflows/cygwin.yml"
- "run*tests.py"
pull_request:
paths:
- "mesonbuild/**"
- "test cases/**"
- "unittests/**"
- ".github/workflows/cygwin.yml"
- "run*tests.py"

Expand All @@ -39,7 +41,7 @@ jobs:
MESON_CI_JOBNAME: cygwin-${{ matrix.NAME }}

steps:
- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
id: restore-cache
with:
# should use 'pip3 cache dir' to discover this path
Expand All @@ -49,7 +51,7 @@ jobs:

- run: git config --global core.autocrlf input

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: cygwin/cygwin-install-action@master
with:
Expand All @@ -67,6 +69,7 @@ jobs:
libgtk3-devel
libxml2-devel
libxslt-devel
make
ninja
python2-devel
python3-devel
Expand All @@ -83,7 +86,7 @@ jobs:
python3 -m pip --disable-pip-version-check install gcovr fastjsonschema pefile pytest pytest-subtests pytest-xdist coverage
shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}'

- uses: actions/cache/save@v3
- uses: actions/cache/save@v4
with:
# should use 'pip3 cache dir' to discover this path
path: C:\cygwin\home\runneradmin\.cache\pip
Expand All @@ -99,7 +102,7 @@ jobs:
SKIP_STATIC_BOOST: 1
shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}'

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.NAME }}
path: meson-test-run.*
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/file_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: python3 ./run_format_tests.py
1 change: 1 addition & 0 deletions .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
- { name: Ubuntu Bionic, id: bionic }
- { name: Ubuntu Rolling, id: ubuntu-rolling }
steps:
# Need v3 because of bionic
- uses: actions/checkout@v3

# Login to dockerhub
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ on:
paths:
- "**.py"
- ".github/workflows/lint.yml"
- ".pylintrc"
- ".flake8"
- ".mypy.ini"
pull_request:
paths:
- "**.py"
- ".github/workflows/lint.yml"
- ".pylintrc"
- ".flake8"
- ".mypy.ini"

permissions:
contents: read
Expand All @@ -22,8 +28,8 @@ jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: python -m pip install pylint
Expand All @@ -32,8 +38,8 @@ jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: python -m pip install flake8
Expand All @@ -42,11 +48,12 @@ jobs:
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: python -m pip install mypy coverage strictyaml types-PyYAML types-tqdm types-chevron
# Pin mypy to version 1.8, so we retain the ability to lint for Python 3.7
- run: python -m pip install "mypy==1.8" coverage strictyaml types-PyYAML types-tqdm types-chevron
- run: python run_mypy.py --allver
env:
PYTHONUNBUFFERED: 1
Expand Down
40 changes: 21 additions & 19 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ jobs:
unittests-appleclang:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-xdist pytest-subtests fastjsonschema coverage
- run: brew install pkg-config ninja llvm qt@5
- env:
CPPFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CPPFLAGS: "-I/opt/homebrew/include"
LDFLAGS: "-L/opt/homebrew/lib"
MESON_CI_JOBNAME: unittests-appleclang
MESON_UNIT_TEST_BACKEND: ninja
HOMEBREW_NO_AUTO_UPDATE: 1
# These cannot evaluate anything, so we cannot set PATH or SDKROOT here
run: |
export SDKROOT="$(xcodebuild -version -sdk macosx Path)"
export PATH="$HOME/tools:/usr/local/opt/qt@5/bin:$PATH:$(brew --prefix llvm)/bin"
export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH"
export PATH="$HOME/tools:/opt/homebrew/opt/qt@5/bin:/opt/homebrew/opt/llvm/bin:$PATH"
export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH"
./tools/run_with_cov.py ./run_unittests.py
- name: Aggregate coverage reports
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
HOMEBREW_NO_AUTO_UPDATE: 1

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Avoid picking up an older version of LLVM that does not work.
- run: brew update
# github actions overwrites brew's python. Force it to reassert itself, by running in a separate step.
Expand All @@ -93,25 +93,25 @@ jobs:
# Delete nonsensical PEP 668 breakage. It is the wrong solution to the problem and isn't designed to be
# productive -- only victim blaming -- however it bites particularly badly because this is a container/VM
# See commit 5c479d7a13a518c18ccb4dc3b6bdd7bfc2a9bdb5 for a more thorough analysis.
find /usr/local/Cellar/python* -name EXTERNALLY-MANAGED -print0 | xargs -0 rm -vf
find /opt/homebrew/Cellar/python* -name EXTERNALLY-MANAGED -print0 | xargs -0 rm -vf
# use python3 from homebrew because it is a valid framework, unlike the actions one:
# https://github.com/actions/setup-python/issues/58
- run: brew install pkg-config ninja llvm qt@5 boost ldc hdf5 openmpi lapack scalapack sdl2 boost-python3 gtk-doc
- run: brew install pkg-config ninja llvm qt@5 boost ldc hdf5 openmpi lapack scalapack sdl2 boost-python3 gtk-doc zstd ncurses objfw libomp
- run: |
python3 -m pip install --upgrade setuptools
python3 -m pip install --upgrade pip
python3 -m pip install cython coverage
- env:
CPPFLAGS: "-I/usr/local/include"
LDFLAGS: "-L/usr/local/lib"
CPPFLAGS: "-I/opt/homebrew/include"
LDFLAGS: "-L/opt/homebrew/lib"
MESON_ARGS: --unity=${{ matrix.unity }}
XML_CATALOG_FILES: "/opt/homebrew/etc/xml/catalog"
CI: 1
# These cannot evaluate anything, so we cannot set PATH or SDKROOT here
run: |
export SDKROOT="$(xcodebuild -version -sdk macosx Path)"
export PATH="$HOME/tools:/usr/local/opt/qt@5/bin:$PATH:$(brew --prefix llvm)/bin"
export PKG_CONFIG_PATH="/usr/local/opt/qt@5/lib/pkgconfig:$PKG_CONFIG_PATH"
export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"
export PATH="$HOME/tools:/opt/homebrew/opt/qt@5/bin:/opt/homebrew/opt/llvm/bin:/opt/homebrew/opt/ncurses/bin:$PATH"
export PKG_CONFIG_PATH="/opt/homebrew/opt/qt@5/lib/pkgconfig:/opt/homebrew/opt/lapack/lib/pkgconfig:/opt/homebrew/opt/ncurses/lib/pkgconfig:$PKG_CONFIG_PATH"
./tools/run_with_cov.py ./run_project_tests.py --backend=ninja
- name: Aggregate coverage reports
Expand All @@ -126,12 +126,14 @@ jobs:
verbose: true

Qt4macos:
runs-on: macos-latest
# This job only works on Intel Macs, because OpenSSL 1.0 doesn't build on
# Apple ARM
runs-on: macos-13
env:
HOMEBREW_NO_AUTO_UPDATE: 1
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: python -m pip install -e .
Expand All @@ -143,13 +145,13 @@ jobs:
- run: ln -sfn /usr/local/Cellar/qt@4/4.8.7_6.reinstall /usr/local/Cellar/qt@4/4.8.7_6
- run: meson setup "test cases/frameworks/4 qt" build -Drequired=qt4
- run: meson compile -C build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: Qt4_Mac_build
path: build/meson-logs/meson-log.txt
- run: meson test -C build -v
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: Qt4_Mac_test
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
shell: msys2 {0}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: msys2/setup-msys2@v2
with:
Expand All @@ -85,6 +85,7 @@ jobs:
mingw-w64-${{ matrix.MSYS2_ARCH }}-python-setuptools
mingw-w64-${{ matrix.MSYS2_ARCH }}-python-pip
mingw-w64-${{ matrix.MSYS2_ARCH }}-python-fastjsonschema
mingw-w64-${{ matrix.MSYS2_ARCH }}-objfw
mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.TOOLCHAIN }}
- name: Install dependencies
Expand Down Expand Up @@ -126,7 +127,7 @@ jobs:
MSYSTEM= python3 ./tools/run_with_cov.py run_tests.py --backend=ninja
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.NAME }}
path: meson-test-run.*
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nonnative.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
apt-get -y purge clang gcc gdc
apt-get -y autoremove
python3 -m pip install coverage
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run tests
run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./tools/run_with_cov.py ./run_tests.py $CI_ARGS --cross ubuntu-armhf.json --cross-only'

Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/os_comp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ on:
- ".github/workflows/os_comp.yml"
- "run*tests.py"

# make GHA actions use node16 which still works with bionic
# See https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
# Unclear how long this will work though
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

permissions:
contents: read

Expand All @@ -48,12 +54,20 @@ jobs:
MESON_CI_JOBNAME: linux-${{ matrix.cfg.id }}-gcc

steps:
# Need v3 because of bionic
- uses: actions/checkout@v3
- name: Run tests
# All environment variables are stored inside the docker image in /ci/env_vars.sh
# They are defined in the `env` section in each image.json. CI_ARGS should be set
# via the `args` array ub the image.json
run: bash -c 'source /ci/env_vars.sh; cd $GITHUB_WORKSPACE; ./tools/run_with_cov.py ./run_tests.py $CI_ARGS'
shell: bash
run: |
# dmd is installed under /root on OpenSUSE
[[ ${{ matrix.cfg.id }} == opensuse ]] && export HOME=/root
source /ci/env_vars.sh
cd $GITHUB_WORKSPACE
./tools/run_with_cov.py ./run_tests.py $CI_ARGS
- name: Aggregate coverage reports
run: ./ci/combine_cov.sh
Expand All @@ -74,7 +88,7 @@ jobs:
MESON_CI_JOBNAME_UPDATE: linux-arch-gcc-pypy

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run tests
run: |
source /ci/env_vars.sh
Expand Down Expand Up @@ -128,7 +142,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run tests
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stable_builddir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
env:
TESTDIR: "manual tests/13 builddir upgrade"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: install ninja
run: sudo apt-get -y install build-essential ninja-build
- name: Fetch tags and unshallow
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/unusedargs_missingreturn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ jobs:
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Compilers
Expand All @@ -71,8 +71,8 @@ jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
Loading

0 comments on commit d8bf7e3

Please sign in to comment.