From 2437a2108a4cf682aafc7d60122ae103e6b6ce1a Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Thu, 5 Sep 2024 16:38:44 -0700 Subject: [PATCH] ci: update CI versions --- .github/workflows/CI.yml | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fd7ed67..3c87bbe 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -5,37 +5,33 @@ on: jobs: Test: - if: "!contains(github.event.head_commit.message, '[skip ci]')" + if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: - windows-latest - - macos-latest + - macos-13 - ubuntu-latest # - macos-11 # arm64 d: - - "ldc-1.28.0" + - "ldc-latest" node: - - 16 + - 20 pnpm: - - 6 + - 9 compiler: - - llvm-12.0.0 - cmake: - - "3.22.1" - ninja: - - "1.10.2" + - llvm steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: "true" # Cache - name: Cache id: cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ~/.dub @@ -44,17 +40,17 @@ jobs: D:\.pnpm-store ./.dub ~/llvm - key: "cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}-dub:${{ hashFiles('./dub.selections.json')}}-pnpm:${{ hashFiles('./pnpm-lock.yaml') }}" + key: "cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}-${{ hashFiles('./dub.selections.json', './pnpm-lock.yaml')}} }}" restore-keys: | - "cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}" + "cache-OS:${{ matrix.os }}-D:${{ matrix.d }}-CXX:${{ matrix.compiler }}-" # Setup compilers and tools - name: Setup Cpp uses: aminya/setup-cpp@v1 with: compiler: ${{ matrix.compiler }} - cmake: ${{ matrix.cmake }} - ninja: ${{ matrix.ninja }} + cmake: true + ninja: true - name: Setup D uses: dlang-community/setup-dlang@v1 @@ -63,7 +59,7 @@ jobs: - name: Setup Mac Arm64 shell: bash - if: contains(matrix.os, 'macos-11') + if: contains(matrix.os, 'macos-13') run: | ARCH="arm64" echo "ARCH=$ARCH" >> $GITHUB_ENV @@ -73,7 +69,7 @@ jobs: echo "CFLAGS=$CFLAGS -arch $ARCH" >> $GITHUB_ENV echo "LDFLAGS=$LDFLAGS -arch $ARCH" >> $GITHUB_ENV - # Manually install ldc + # Manually install ldc # Due to https://github.com/dlang-community/setup-dlang/issues/51 curl -LJO https://github.com/ldc-developers/ldc/releases/download/v1.28.0/ldc2-1.28.0-osx-$ARCH.tar.xz tar -xf ldc2-1.28.0-osx-$ARCH.tar.xz @@ -91,7 +87,7 @@ jobs: echo "DC=ldc2" >> $GITHUB_ENV - name: Setup Node - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} @@ -112,6 +108,6 @@ jobs: run: pnpm test - name: Upload artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: path: ./dist