diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index 6a78a36c62a2..000000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - analyze: - # lgtm.com does not run in forks, for good reason - if: github.repository == 'mesonbuild/meson' - name: Analyze - runs-on: ubuntu-latest - permissions: - security-events: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - # bypass cache: https://github.com/github/codeql-action/issues/1445 - tools: linked - config-file: .github/codeql/codeql-config.yml - languages: python - # we have none - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml deleted file mode 100644 index d819f802f1fe..000000000000 --- a/.github/workflows/cygwin.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: cygwin - -concurrency: - group: cygwin-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - # Stable branches such as 0.56 or 1.0 - - '[0-9]+.[0-9]+' - 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" - -permissions: - contents: read - -jobs: - test: - runs-on: windows-latest - name: ${{ matrix.NAME }} - strategy: - fail-fast: false - matrix: - include: - - NAME: gccx64ninja - ARCH: x86_64 - env: - MESON_CI_JOBNAME: cygwin-${{ matrix.NAME }} - - steps: - - uses: actions/cache/restore@v4 - id: restore-cache - with: - # should use 'pip3 cache dir' to discover this path - path: C:\cygwin\home\runneradmin\.cache\pip - key: cygwin-pip-${{ github.run_number }} - restore-keys: cygwin-pip- - - - run: git config --global core.autocrlf input - - - uses: actions/checkout@v4 - - - uses: cygwin/cygwin-install-action@master - with: - platform: ${{ matrix.ARCH }} - packages: | - cmake - gcc-fortran - gcc-objc++ - gcc-objc - git - gobject-introspection - gtk-doc - libboost-devel - libglib2.0-devel - libgtk3-devel - libxml2-devel - libxslt-devel - make - ninja - python2-devel - python3-devel - python3-libxml2 - python3-libxslt - python39-pip - python39-wheel - vala - zlib-devel - - - name: Run pip - run: | - export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 - 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@v4 - with: - # should use 'pip3 cache dir' to discover this path - path: C:\cygwin\home\runneradmin\.cache\pip - key: cygwin-pip-${{ github.run_number }} - - - name: Run tests - run: | - export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 - python3 ./tools/run_with_cov.py run_tests.py --backend=ninja - env: - # Cygwin's static boost installation is broken (some static library - # variants such as boost_thread are not present) - SKIP_STATIC_BOOST: 1 - shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' - - - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.NAME }} - path: meson-test-run.* - # test log should be saved on failure - if: ${{ !cancelled() }} - - - name: Aggregate coverage reports - run: | - export PATH=/usr/bin:/usr/local/bin:$(cygpath ${SYSTEMROOT})/system32 - ./ci/combine_cov.sh - shell: C:\cygwin\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "${{ matrix.NAME }}" - fail_ci_if_error: false - verbose: true diff --git a/.github/workflows/file_format.yml b/.github/workflows/file_format.yml deleted file mode 100644 index d61d634c0315..000000000000 --- a/.github/workflows/file_format.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: File format check - -on: [push, pull_request] - -concurrency: - group: file_fmt-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -permissions: - contents: read - -jobs: - format: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - run: python3 ./run_format_tests.py diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index d20f7e5ced02..9678df91458f 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -38,12 +38,12 @@ jobs: matrix: cfg: - { name: Arch Linux, id: arch } - - { name: CUDA (on Arch), id: cuda } + #- { name: CUDA (on Arch), id: cuda } - { name: Fedora, id: fedora } - { name: Gentoo, id: gentoo } - - { name: OpenSUSE, id: opensuse } - - { name: Ubuntu Bionic, id: bionic } - - { name: Ubuntu Rolling, id: ubuntu-rolling } + #- { name: OpenSUSE, id: opensuse } + #- { name: Ubuntu Bionic, id: bionic } + #- { name: Ubuntu Rolling, id: ubuntu-rolling } steps: # Need v3 because of bionic - uses: actions/checkout@v3 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 5588034723b8..000000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Lint - -concurrency: - group: lint-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -on: - push: - 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 - -jobs: - - pylint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - run: python -m pip install pylint - - run: pylint --output-format colorized mesonbuild - - flake8: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - run: python -m pip install flake8 - - run: flake8 --color always mesonbuild/ - - mypy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - # 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 - TERM: xterm-color - MYPY_FORCE_COLOR: 1 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 88acbef90206..000000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,158 +0,0 @@ -name: macos - -concurrency: - group: macos-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - # Stable branches such as 0.56 or 1.0 - - '[0-9]+.[0-9]+' - paths: - - "mesonbuild/**" - - "test cases/**" - - "unittests/**" - - ".github/workflows/macos.yml" - - "run*tests.py" - pull_request: - paths: - - "mesonbuild/**" - - "test cases/**" - - "unittests/**" - - ".github/workflows/macos.yml" - - "run*tests.py" - -permissions: - contents: read - -jobs: - unittests-appleclang: - runs-on: macos-latest - steps: - - 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/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:/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 - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "appleclang [unit tests]" - fail_ci_if_error: false - verbose: true - - - project-tests-appleclang: - runs-on: macos-latest - strategy: - fail-fast: false - matrix: - include: - - NAME: macos-clang - unity: off - - NAME: macos-clang-unity - unity: on - - name: ${{ matrix.NAME }} - env: - MESON_CI_JOBNAME: ${{ matrix.NAME }} - HOMEBREW_NO_AUTO_UPDATE: 1 - - steps: - - 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. - - name: unbreak python in github actions - run: | - find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete - sudo rm -rf /Library/Frameworks/Python.framework/ - brew install --force python3 && brew unlink python3 && brew unlink python3 && brew link --overwrite python3 - # 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 /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 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/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:/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 - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "appleclang [project tests; unity=${{ matrix.unity }}]" - fail_ci_if_error: false - verbose: true - - Qt4macos: - # 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@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - run: python -m pip install -e . - - run: brew install pkg-config ninja gcc - - run: brew tap cartr/qt4 - - run: brew install qt@4 - - run: brew link qt@4 - # qt4 tap seems to be broken - - 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@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@v4 - if: failure() - with: - name: Qt4_Mac_test - path: build/meson-logs/testlog.txt diff --git a/.github/workflows/msys2.yml b/.github/workflows/msys2.yml deleted file mode 100644 index 3b518fee7607..000000000000 --- a/.github/workflows/msys2.yml +++ /dev/null @@ -1,144 +0,0 @@ -name: msys2 - -concurrency: - group: msys2-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - # Stable branches such as 0.56 or 1.0 - - '[0-9]+.[0-9]+' - paths: - - "mesonbuild/**" - - "test cases/**" - - "unittests/**" - - ".github/workflows/msys2.yml" - - "run*tests.py" - pull_request: - paths: - - "mesonbuild/**" - - "test cases/**" - - "unittests/**" - - ".github/workflows/msys2.yml" - - "run*tests.py" - -permissions: - contents: read - -jobs: - test: - runs-on: windows-2019 - name: ${{ matrix.NAME }} - strategy: - fail-fast: false - matrix: - include: - - NAME: gccx86ninja - MSYSTEM: MINGW32 - MSYS2_ARCH: i686 - MSYS2_CURSES: ncurses - COMPILER: gcc - TOOLCHAIN: toolchain - - NAME: gccx64ninja - MSYSTEM: MINGW64 - MSYS2_ARCH: x86_64 - MSYS2_CURSES: pdcurses - COMPILER: gcc - TOOLCHAIN: toolchain - - NAME: clangx64ninja - MSYSTEM: MINGW64 - MSYS2_ARCH: x86_64 - MSYS2_CURSES: - COMPILER: clang - TOOLCHAIN: clang - env: - MESON_CI_JOBNAME: msys2-${{ matrix.NAME }} - - defaults: - run: - shell: msys2 {0} - - steps: - - uses: actions/checkout@v4 - - - uses: msys2/setup-msys2@v2 - with: - msystem: ${{ matrix.MSYSTEM }} - update: true - install: >- - base-devel - git - mercurial - lcov - wget - unzip - mingw-w64-${{ matrix.MSYS2_ARCH }}-cmake - mingw-w64-${{ matrix.MSYS2_ARCH }}-glib2 - mingw-w64-${{ matrix.MSYS2_ARCH }}-libxml2 - mingw-w64-${{ matrix.MSYS2_ARCH }}-ninja - mingw-w64-${{ matrix.MSYS2_ARCH }}-pkg-config - mingw-w64-${{ matrix.MSYS2_ARCH }}-python2 - mingw-w64-${{ matrix.MSYS2_ARCH }}-python - mingw-w64-${{ matrix.MSYS2_ARCH }}-python-lxml - 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 - run: | - python3 -m pip --disable-pip-version-check install gcovr pefile pytest pytest-subtests pytest-xdist coverage - - - name: Install pypy3 on x86_64 - run: | - mkdir pypy3local - pushd pypy3local - wget -nv https://downloads.python.org/pypy/pypy3.8-v7.3.9-win64.zip - unzip pypy3.8-v7.3.9-win64.zip - mv pypy3.8-v7.3.9-win64/* ./ - popd - if: ${{ matrix.MSYS2_ARCH == 'x86_64' }} - - - name: Run Tests - run: | - if [[ "${{ matrix.MSYS2_ARCH }}" == "x86_64" ]]; then - # There apparently is no clean way to add to the PATH in the - # previous step? - # See for instance https://github.com/msys2/setup-msys2/issues/171 - export PATH=$PATH:$PWD/pypy3local - # Make sure it is on the PATH - pypy3 -c "import sys; print(sys.version)" - fi - export PATHEXT="$PATHEXT;.py" - - if [[ '${{ matrix.COMPILER }}' == 'clang' ]]; then - export CC=clang - export CXX=clang++ - export OBJC=clang - export OBJCXX=clang++ - fi - - if [[ "${{ matrix.MSYS2_CURSES }}" != "" ]]; then - pacman --noconfirm --needed -S mingw-w64-${{ matrix.MSYS2_ARCH }}-${{ matrix.MSYS2_CURSES }} - fi - - MSYSTEM= python3 ./tools/run_with_cov.py run_tests.py --backend=ninja - - - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.NAME }} - path: meson-test-run.* - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "${{ matrix.NAME }}" - fail_ci_if_error: false - verbose: true diff --git a/.github/workflows/nonnative.yml b/.github/workflows/nonnative.yml deleted file mode 100644 index 2712d1032935..000000000000 --- a/.github/workflows/nonnative.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Cross-only compilation environment - -concurrency: - group: nonnative-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - # Stable branches such as 0.56 or 1.0 - - '[0-9]+.[0-9]+' - paths: - - "mesonbuild/**" - - "test cases/**" - - ".github/workflows/nonnative.yml" - - "run*tests.py" - pull_request: - paths: - - "mesonbuild/**" - - "test cases/**" - - ".github/workflows/nonnative.yml" - - "run*tests.py" - -permissions: - contents: read - -jobs: - cross-only-armhf: - runs-on: ubuntu-latest - container: mesonbuild/eoan:latest - env: - MESON_CI_JOBNAME: ubuntu-${{ github.job }} - - steps: - - run: | - apt-get -y purge clang gcc gdc - apt-get -y autoremove - python3 -m pip install coverage - - 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' - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "Ubuntu nonnative" - fail_ci_if_error: false - verbose: true diff --git a/.github/workflows/os_comp.yml b/.github/workflows/os_comp.yml deleted file mode 100644 index 0912a750a76b..000000000000 --- a/.github/workflows/os_comp.yml +++ /dev/null @@ -1,186 +0,0 @@ -name: linux - -concurrency: - group: linux-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -on: - push: - branches: - - master - # Stable branches such as 0.56 or 1.0 - - '[0-9]+.[0-9]+' - paths: - - "mesonbuild/**" - - "test cases/**" - - "unittests/**" - - ".github/workflows/images.yml" - - ".github/workflows/os_comp.yml" - - "run*tests.py" - pull_request: - paths: - - "mesonbuild/**" - - "test cases/**" - - "unittests/**" - - ".github/workflows/images.yml" - - ".github/workflows/os_comp.yml" - - "run*tests.py" - -permissions: - contents: read - -jobs: - arch: - name: ${{ matrix.cfg.name }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - cfg: - - { name: Arch Linux, id: arch } - - { name: CUDA (on Arch), id: cuda } - - { name: Fedora, id: fedora } - - { name: Gentoo, id: gentoo } - - { name: OpenSUSE, id: opensuse } - - { name: Ubuntu Bionic, id: bionic } - container: - image: mesonbuild/${{ matrix.cfg.id }}:latest - volumes: - - ${{ matrix.cfg.id == 'bionic' && '/node20217:/node20217:rw,rshared' || ' ' }} - - ${{ matrix.cfg.id == 'bionic' && '/node20217:/__e/node20:ro,rshared' || ' ' }} - env: - MESON_CI_JOBNAME: linux-${{ matrix.cfg.id }}-gcc - - steps: - - name: install nodejs20glibc2.17 - if: ${{ matrix.cfg.id == 'bionic' }} - run: | - apt install curl -y - curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz - tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217 - ldd /__e/node20/bin/node - - uses: actions/checkout@v4 - - - 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 - 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 - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "OS Comp [${{ matrix.cfg.name }}]" - fail_ci_if_error: false - verbose: true - - pypy: - name: 'Arch / PyPy' - runs-on: ubuntu-latest - container: mesonbuild/arch:latest - env: - MESON_CI_JOBNAME_UPDATE: linux-arch-gcc-pypy - - steps: - - uses: actions/checkout@v4 - - name: Run tests - run: | - source /ci/env_vars.sh - export MESON_CI_JOBNAME=$MESON_CI_JOBNAME_UPDATE - pypy3 run_tests.py - - ubuntu-rolling: - name: 'Ubuntu Rolling' - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - cfg: - - CC: 'gcc' - CXX: 'g++' - - MESON_ARGS: '--unity=on -Ddefault_library=static' - RUN_TESTS_ARGS: '--no-unittests' - CC: 'gcc' - CXX: 'g++' - - MESON_ARGS: '-Ddefault_library=both' - RUN_TESTS_ARGS: '--no-unittests' - CC: 'gcc' - CXX: 'g++' - - CC: 'clang' - CXX: 'clang++' - - MESON_ARGS: '--unity=on' - RUN_TESTS_ARGS: '--no-unittests' - CC: 'clang' - CXX: 'clang++' - - RUN_TESTS_ARGS: '--cross ubuntu-armhf.json --cross linux-mingw-w64-64bit.json' - MESON_RSP_THRESHOLD: '0' - CC: 'gcc' - CXX: 'g++' - - RUN_TESTS_ARGS: '--cross ubuntu-armhf.json --cross linux-mingw-w64-64bit.json' - MESON_ARGS: '--unity=on' - CC: 'gcc' - CXX: 'g++' - - env: - MESON_CI_JOBNAME_UPDATE: linux-${{ github.job }}-${{ matrix.cfg.CC }} - - container: - image: mesonbuild/ubuntu-rolling - env: - MESON_RSP_THRESHOLD: ${{ matrix.cfg.MESON_RSP_THRESHOLD }} - MESON_ARGS: ${{ matrix.cfg.MESON_ARGS }} - RUN_TESTS_ARGS: ${{ matrix.cfg.RUN_TESTS_ARGS }} - CC: ${{ matrix.cfg.CC }} - CXX: ${{ matrix.cfg.CXX }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Run tests - shell: bash - run: | - export HOME=/root - - export CC=$CC - export CXX=$CXX - export OBJC=$CC - export OBJCXX=$CXX - export PATH=$(pwd)/tools:$PATH - if test "$MESON_RSP_THRESHOLD" != "" - then - export MESON_RSP_THRESHOLD=$MESON_RSP_THRESHOLD - fi - - source /ci/env_vars.sh - export MESON_CI_JOBNAME=$MESON_CI_JOBNAME_UPDATE - - update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix - update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix - update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix - update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix - - ./tools/run_with_cov.py ./run_tests.py $RUN_TESTS_ARGS -- $MESON_ARGS - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "Ubuntu [${{ matrix.cfg.CC }} ${{ matrix.cfg.RUN_TESTS_ARGS }} ${{ matrix.cfg.MESON_ARGS }}]" - fail_ci_if_error: false - verbose: true diff --git a/.github/workflows/stable_builddir.yml b/.github/workflows/stable_builddir.yml deleted file mode 100644 index ae2951801cef..000000000000 --- a/.github/workflows/stable_builddir.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: stable build directories - -on: - push: - branches: - - '[0-9]+.[0-9]+' - -permissions: - contents: read - -jobs: - regression: - runs-on: ubuntu-latest - env: - TESTDIR: "manual tests/13 builddir upgrade" - steps: - - uses: actions/checkout@v4 - - name: install ninja - run: sudo apt-get -y install build-essential ninja-build - - name: Fetch tags and unshallow - run: git fetch --unshallow --tags - - name: Checkout latest release on this branch - run: | - cp -r "$TESTDIR" "$TESTDIR"-temp - git checkout "$(git describe --abbrev=0)" - - name: Configure with most recent tag - run: ./meson.py setup "$TESTDIR"-temp builddir - - name: Return to testing commit - run: git checkout $GITHUB_SHA - - name: check that everything still works - run: | - ./meson.py compile -C builddir - ninja -C builddir test - DESTDIR=pkg ninja -C builddir install - ./meson.py introspect builddir --all diff --git a/.github/workflows/unusedargs_missingreturn.yml b/.github/workflows/unusedargs_missingreturn.yml deleted file mode 100644 index 72f39b511f45..000000000000 --- a/.github/workflows/unusedargs_missingreturn.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: UnusedMissingReturn -# this workflow checks for -# * unused input arguments -# * missing return values -# * strict prototypes -# some users have default configs that will needlessly fail Meson self-tests due to these syntax. -env: - CFLAGS: "-Werror=unused-parameter -Werror=return-type -Werror=strict-prototypes" - CPPFLAGS: "-Werror=unused-parameter -Werror=return-type" - FFLAGS: "-fimplicit-none" - -concurrency: - group: unusedargs-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -on: - push: - paths: - - ".github/workflows/unusedargs_missingreturn.yml" - - "test cases/cmake/**" - - "test cases/common/**" - - "test cases/fortran/**" - - "test cases/linuxlike/**" - - "test cases/objc/**" - - "test cases/objcpp/**" - - "test cases/windows/**" - - pull_request: - paths: - - ".github/workflows/unusedargs_missingreturn.yml" - - "test cases/cmake/**" - - "test cases/common/**" - - "test cases/fortran/**" - - "test cases/linuxlike/**" - - "test cases/objc/**" - - "test cases/objcpp/**" - - "test cases/windows/**" - -permissions: - contents: read - -jobs: - - linux: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - name: Install Compilers - run: | - sudo apt update -yq - sudo apt install -yq --no-install-recommends g++ gfortran ninja-build gobjc gobjc++ - python -m pip install coverage - - run: ./tools/run_with_cov.py run_project_tests.py --only cmake common fortran platform-linux "objective c" "objective c++" - env: - MESON_CI_JOBNAME: linux-ubuntu-gcc-werror - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "UnusedMissingReturn" - fail_ci_if_error: false - verbose: true - - windows: - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - run: pip install ninja pefile coverage - - - run: python ./tools/run_with_cov.py run_project_tests.py --only platform-windows - env: - CC: gcc - CXX: g++ - FC: gfortran - MESON_CI_JOBNAME: msys2-gcc-werror - - - name: Aggregate coverage reports - run: ./ci/combine_cov.sh - shell: C:\msys64\usr\bin\bash.exe --noprofile --norc -o igncr -eo pipefail '{0}' - - - name: Upload coverage report - uses: codecov/codecov-action@v3 - with: - files: .coverage/coverage.xml - name: "UnusedMissingReturn Windows" - fail_ci_if_error: false - verbose: true diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml deleted file mode 100644 index fdb7d1400919..000000000000 --- a/.github/workflows/website.yml +++ /dev/null @@ -1,91 +0,0 @@ -name: Update website - -concurrency: - group: mesonbuild.com - # We do NOT want `cancel-in-progress` here since only one website job - # should run at a time to avoid upload race conditions. - -on: - push: - branches: - - master - paths: - - .github/workflows/website.yml - - docs/** - pull_request: - paths: - - .github/workflows/website.yml - - docs/** - workflow_dispatch: - release: - types: - - published - -permissions: - contents: write # for release creation (svenstaro/upload-release-action) - -# This job is copy/paster into wrapdb CI, please update it there when doing any -# change here. -jobs: - update_website: - env: - HAS_SSH_KEY: ${{ secrets.WEBSITE_PRIV_KEY != '' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/cache/restore@v4 - id: restore-cache - with: - # should use 'pip3 cache dir' to discover this path - path: ~/.cache/pip - key: website-pip-${{ github.run_number }} - restore-keys: website-pip- - - - name: Install package - run: | - sudo apt-get -y install python3-pip ninja-build libjson-glib-dev - pip install hotdoc chevron strictyaml - - - uses: actions/cache/save@v4 - with: - # should use 'pip3 cache dir' to discover this path - path: ~/.cache/pip - key: website-pip-${{ github.run_number }} - - - name: Setup SSH Keys and known_hosts - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - run: | - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add - <<< "${{ secrets.WEBSITE_PRIV_KEY }}" - if: github.ref == 'refs/heads/master' && env.HAS_SSH_KEY == 'true' - - name: Build website - run: | - git config --global user.name "github-actions" - git config --global user.email "github-actions@github.com" - cd docs - ../meson.py setup _build - ninja -C _build - ninja -C _build test - - name: Update website - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - run: | - cd docs - ninja -C _build upload - if: github.ref == 'refs/heads/master' && env.HAS_SSH_KEY == 'true' - - name: Release the current JSON docs - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: docs/_build/reference_manual.json - tag: ${{ github.ref }} - if: ${{ github.event_name == 'release' }} - - name: Release the current man docs - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: docs/_build/meson-reference.3 - tag: ${{ github.ref }} - if: ${{ github.event_name == 'release' }}