diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef14a4e..90291c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,110 +9,62 @@ jobs: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} - env: - CMAKE_GENERATOR: Ninja - strategy: fail-fast: false matrix: - name: [ - ubuntu-18.04-gcc-7, - ubuntu-18.04-gcc-8, - ubuntu-18.04-gcc-9, - ubuntu-20.04-gcc-10, - ubuntu-20.04-gcc-11, - ubuntu-18.04-clang-5.0, - ubuntu-18.04-clang-6.0, - ubuntu-18.04-clang-7, - ubuntu-18.04-clang-8, - ubuntu-20.04-clang-9, - ubuntu-20.04-clang-10, - ubuntu-20.04-clang-11, - ubuntu-20.04-clang-11-no-exceptions, - windows-2019-cl, - windows-2019-clang-cl, - windows-2019-clang, - windows-2019-gcc, - macOS-latest-gcc-7, - macOS-latest-gcc-8, - macOS-latest-gcc-9, - macOS-latest-xcode-12.5, - ] - include: - name: ubuntu-18.04-gcc-7 os: ubuntu-18.04 - compiler: gcc - version: "7" - - - name: ubuntu-18.04-gcc-8 - os: ubuntu-18.04 - compiler: gcc - version: "8" + compiler: gcc-7 - name: ubuntu-18.04-gcc-9 os: ubuntu-18.04 - compiler: gcc - version: "9" + compiler: gcc-9 - name: ubuntu-20.04-gcc-10 os: ubuntu-20.04 - compiler: gcc - version: "10" + compiler: gcc-10 - name: ubuntu-20.04-gcc-11 os: ubuntu-20.04 - compiler: gcc - version: "11" + compiler: gcc-11 - - name: ubuntu-18.04-clang-5.0 + - name: ubuntu-18.04-clang-5 os: ubuntu-18.04 - compiler: clang - version: "5.0" - - - name: ubuntu-18.04-clang-6.0 - os: ubuntu-18.04 - compiler: clang - version: "6.0" + compiler: clang-5.0 - name: ubuntu-18.04-clang-7 os: ubuntu-18.04 - compiler: clang - version: "7" - - - name: ubuntu-18.04-clang-8 - os: ubuntu-18.04 - compiler: clang - version: "8" + compiler: clang-7 - name: ubuntu-20.04-clang-9 os: ubuntu-20.04 - compiler: clang - version: "9" + compiler: clang-9 - name: ubuntu-20.04-clang-10 os: ubuntu-20.04 - compiler: clang - version: "10" + compiler: clang-10 - name: ubuntu-20.04-clang-11 os: ubuntu-20.04 - compiler: clang - version: "11" + compiler: clang-11 + + - name: ubuntu-20.04-clang-12 + os: ubuntu-20.04 + compiler: clang-12 - name: ubuntu-20.04-clang-11-no-exceptions os: ubuntu-20.04 - compiler: clang - version: "11" + compiler: clang-11 cmake_vars: "-DCMAKE_CXX_FLAGS=-fno-exceptions -DBUILD_TESTING=OFF -DBUILD_BENCHMARK=ON" - - name: windows-2019-cl - os: windows-2019 - compiler: cl + - name: ubuntu-22.04 + os: ubuntu-22.04 + compiler: gcc - - name: windows-2019-clang-cl + - name: windows-2019 os: windows-2019 - compiler: clang-cl + compiler: msvc - name: windows-2019-clang os: windows-2019 @@ -122,99 +74,45 @@ jobs: os: windows-2019 compiler: gcc - - name: macOS-latest-gcc-7 - os: macOS-latest - compiler: gcc - version: "7" + - name: windows-2022 + os: windows-2022 + compiler: msvc - - name: macOS-latest-gcc-8 - os: macOS-latest - compiler: gcc - version: "8" + # - name: macOS-11-gcc-7 + # os: macOS-11 + # compiler: gcc-7 - - name: macOS-latest-gcc-9 - os: macOS-latest - compiler: gcc - version: "9" + # - name: macOS-11-gcc-8 + # os: macOS-11 + # compiler: gcc-8 - - name: macOS-latest-xcode-12.5 - os: macOS-latest - compiler: xcode - version: "12.5" + - name: macOS-11-gcc-9 + os: macOS-11 + compiler: gcc-9 + + # - name: macOS-11-clang-11 + # os: macOS-11 + # compiler: clang-11 + + - name: macOS-11-clang-12 + os: macOS-11 + compiler: clang-12 + + - name: macOS-11-clang-13 + os: macOS-11 + compiler: clang-13 + + - name: macOS-12 + os: macOS-12 + compiler: clang steps: - uses: actions/checkout@v2 - - name: Install (Linux) - if: runner.os == 'Linux' - run: | - # Required for libc6-dbg:i386 and g++-multilib packages which are - # needed for x86 builds. - sudo dpkg --add-architecture i386 - # clang-3.7 and earlier are not available in Bionic anymore so we get - # them from the Xenial repositories instead. - sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial main" - sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe" - - sudo apt-get update - # libc6-dbg:i386 is required for running valgrind on x86. - sudo apt-get install -y ninja-build valgrind libc6-dbg:i386 -o APT::Immediate-Configure=0 - if [ "${{ matrix.compiler }}" = "gcc" ]; then - sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib - echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV - echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV - else - sudo apt-get install -y clang-${{ matrix.version }} g++-multilib - echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV - echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV - fi - - - name: Install (macOS) - if: runner.os == 'macOS' - run: | - brew install ninja - if [ "${{ matrix.compiler }}" = "gcc" ]; then - brew install gcc@${{ matrix.version }} - brew link gcc@${{ matrix.version }} - echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV - echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV - else - sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app - echo "CC=clang" >> $GITHUB_ENV - echo "CXX=clang++" >> $GITHUB_ENV - fi - - - name: Install (Windows) - if: runner.os == 'Windows' - shell: powershell - run: | - # Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') - iwr -useb get.scoop.sh | iex - scoop install ninja --global - if ("${{ matrix.compiler }}".StartsWith("clang")) { - scoop install llvm --global - } - if ("${{ matrix.compiler }}" -eq "gcc") { - # Chocolatey GCC is broken on the windows-2019 image. - # See: https://github.com/DaanDeMeyer/doctest/runs/231595515 - # See: https://github.community/t5/GitHub-Actions/Something-is-wrong-with-the-chocolatey-installed-version-of-gcc/td-p/32413 - # scoop install gcc --global - choco install mingw - echo "CC=gcc" >> $GITHUB_ENV - echo "CXX=g++" >> $GITHUB_ENV - } elseif ("${{ matrix.compiler }}" -eq "clang") { - echo "CC=clang" >> $GITHUB_ENV - echo "CXX=clang++" >> $GITHUB_ENV - } else { - echo "CC=${{ matrix.compiler }}" >> $GITHUB_ENV - echo "CXX=${{ matrix.compiler }}" >> $GITHUB_ENV - } - # Scoop modifies the PATH so we make the modified PATH global. - echo "PATH=$env:PATH" >> $GITHUB_ENV - - - name: Configure - if: runner.os == 'Windows' - run: .github\workflows\vsenv.bat -arch=x64 -host_arch=x64 + - name: Setup Cpp + uses: aminya/setup-cpp@v1 + with: + compiler: ${{ matrix.compiler }} - name: Build & Test Debug run: | diff --git a/.github/workflows/single-include.yml b/.github/workflows/single-include.yml index a7b0a7f..3aa6210 100644 --- a/.github/workflows/single-include.yml +++ b/.github/workflows/single-include.yml @@ -19,7 +19,7 @@ jobs: run: | diff inja/inja.hpp inja/inja_old.hpp >/dev/null - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v3 with: name: single_include_inja path: single_include/inja/inja.hpp diff --git a/.github/workflows/vsenv.bat b/.github/workflows/vsenv.bat deleted file mode 100644 index 8fa2223..0000000 --- a/.github/workflows/vsenv.bat +++ /dev/null @@ -1,17 +0,0 @@ -@echo off - -SET VSWHERE="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere" - -:: See https://github.com/microsoft/vswhere/wiki/Find-VC -for /f "usebackq delims=*" %%i in (`%VSWHERE% -latest -property installationPath`) do ( - call "%%i"\Common7\Tools\vsdevcmd.bat %* -) - -:: Loop over all environment variables and make them global using set-env. -:: See: https://help.github.com/en/articles/development-tools-for-github-actions#set-an-environment-variable-set-env -:: See: https://stackoverflow.com/questions/39183272/loop-through-all-environmental-variables-and-take-actions-depending-on-prefix -setlocal -for /f "delims== tokens=1,2" %%a in ('set') do ( - echo %%a=%%b >> $GITHUB_ENV -) -endlocal