From 5c3937365d1586e294dc718115617c3aa29068ed Mon Sep 17 00:00:00 2001 From: Vladimir Morozov Date: Mon, 19 Dec 2022 11:40:48 -0800 Subject: [PATCH] chore: add Windows with VS 2022 and Node.JS 19.x to the CI matrix (#1252) * chore: add Windows and VS 2022 to the CI matrix * apply windows-2022 only to node 18.x * add Node 19.x to the test matrix for Windows * add Node.JS 19.x to MacOS and Ubuntu runners * Fix variable name * remove unused code to setup gcc 6.5 * remove macos-latest + gcc from the matrix * try to fix the MacOS test matrix * try an alternative way to exclude macos-gcc * use alternative syntax to exclude Node 14.x/window-2022 --- .github/workflows/ci-win.yml | 6 +++++- .github/workflows/ci.yml | 28 +++++++++++++--------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci-win.yml b/.github/workflows/ci-win.yml index 183d29e3b..d0712fa17 100644 --- a/.github/workflows/ci-win.yml +++ b/.github/workflows/ci-win.yml @@ -7,9 +7,13 @@ jobs: timeout-minutes: 30 strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [ 14.x, 16.x, 18.x, 19.x ] os: - windows-2019 + - windows-2022 + exclude: + - node-version: 14.x + os: windows-2022 # Node.JS 14.x GYP does not support Visual Studio 2022 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00f3d3aa5..3ee7ba819 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,23 +7,19 @@ jobs: timeout-minutes: 30 strategy: matrix: - node-version: [14.x, 16.x, 18.x] - compiler: - - gcc - - clang + node-version: [ 14.x, 16.x, 18.x, 19.x ] os: - - ubuntu-latest - macos-latest + - ubuntu-latest + compiler: + - clang + - gcc + exclude: + - os: macos-latest + compiler: gcc # GCC is an alias for clang on the MacOS image. runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - name: Install system dependencies - run: | - if [ "${{ matrix.compiler }}" = "gcc" -a "${{ matrix.os }}" = ubuntu-* ]; then - sudo add-apt-repository ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install g++-6.5 - fi - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: @@ -40,12 +36,14 @@ jobs: if [ "${{ matrix.compiler }}" = "gcc" ]; then export CC="gcc" CXX="g++" fi - if [ "${{ matrix.compiler }}" = "gcc" -a "${{ matrix.os }}" = ubuntu-* ]; then - export CC="gcc-6.5" CXX="g++-6.5" AR="gcc-ar-6.5" RANLIB="gcc-ranlib-6.5" NM="gcc-nm-6.5" - fi if [ "${{ matrix.compiler }}" = "clang" ]; then export CC="clang" CXX="clang++" fi + echo "CC=\"$CC\" CXX=\"$CXX\"" + echo "$CC --version" + $CC --version + echo "$CXX --version" + $CXX --version export CFLAGS="$CFLAGS -O3 --coverage" LDFLAGS="$LDFLAGS --coverage" echo "CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\"" npm run pretest -- --verbose