From e0e749b9841e0228740ecdebf7d6f69b1fea6f94 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 25 Oct 2024 00:20:06 -0700 Subject: [PATCH] ci: use node/pnpm versions from config files [skip ci] --- .github/workflows/CI.yml | 42 ++++++++-------------------------------- .vscode/settings.json | 3 +++ cspell.config.yaml | 1 + 3 files changed, 12 insertions(+), 34 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4236c466..eb559344 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,16 +20,11 @@ jobs: Build: runs-on: ${{ matrix.os }} name: Build - if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} strategy: fail-fast: false matrix: os: - ubuntu-22.04 - node: - - 22.6.0 - pnpm: - - 9.11.0 steps: - uses: actions/checkout@v4 with: @@ -38,12 +33,10 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version-file: "./.nvmrc" - name: Setup Pnpm - uses: pnpm/action-setup@v2 - with: - version: ${{ matrix.pnpm }} + uses: pnpm/action-setup@v4 - name: Install run: | @@ -84,7 +77,6 @@ jobs: BuildExecutable: name: Build-Executable-${{ matrix.os }} needs: [Build] - if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -94,10 +86,6 @@ jobs: - ubuntu-24.04 - macos-13 - macos-14 # arm64 - node: - - 22 - pnpm: - - 9.11.0 steps: - uses: actions/checkout@v4 @@ -109,12 +97,10 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version-file: "./.nvmrc" - name: Setup Pnpm - uses: pnpm/action-setup@v2 - with: - version: ${{ matrix.pnpm }} + uses: pnpm/action-setup@v4 - name: Cache node_modules uses: actions/cache@v4 @@ -123,7 +109,7 @@ jobs: ~/.pnpm-store D:\.pnpm-store ./node_modules - key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}" + key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-${{ hashFiles('./.npmrc', './package.json', '.nvmrc', './packages/*/package.json') }}" restore-keys: | "setupcpp-node_modules-cache-OS:${{ matrix.os }}-" @@ -146,7 +132,6 @@ jobs: Test: name: Test-${{ matrix.os }} - if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} needs: [Build] runs-on: ${{ matrix.os }} strategy: @@ -161,10 +146,6 @@ jobs: - macos-14 - macos-13 - macos-12 - node: - - 22 - pnpm: - - 9.11.0 steps: - uses: actions/checkout@v4 with: @@ -178,12 +159,10 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version-file: "./.nvmrc" - name: Setup Pnpm - uses: pnpm/action-setup@v2 - with: - version: ${{ matrix.pnpm }} + uses: pnpm/action-setup@v4 - name: Cache node_modules uses: actions/cache@v4 @@ -192,7 +171,7 @@ jobs: ~/.pnpm-store D:\.pnpm-store ./node_modules - key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-node:${{ matrix.node }}-pnpm:${{ matrix.pnpm }}-${{ hashFiles('./.npmrc') }}-deps:${{ hashFiles('./package.json') }}" + key: "setupcpp-node_modules-cache-OS:${{ matrix.os }}-${{ hashFiles('./.npmrc', './package.json', '.nvmrc', './packages/*/package.json') }}" restore-keys: | "setupcpp-node_modules-cache-OS:${{ matrix.os }}-" @@ -234,7 +213,6 @@ jobs: Docker: name: Docker-${{ matrix.container.image }} - if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} needs: [Build] runs-on: ${{ matrix.os }} strategy: @@ -242,10 +220,6 @@ jobs: matrix: os: - ubuntu-24.04 - node: - - 22 - pnpm: - - 9.11.0 container: - { file: "ubuntu-llvm.dockerfile", image: "setup-cpp-ubuntu-llvm", tag: "22.04-0.44.0" } - { file: "fedora-llvm.dockerfile", image: "setup-cpp-fedora-llvm", tag: "40-0.44.0" } diff --git a/.vscode/settings.json b/.vscode/settings.json index 4d302ddb..e693fece 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,6 +26,9 @@ "[yaml]": { "editor.defaultFormatter": "dprint.dprint" }, + "[github-actions-workflow]": { + "editor.defaultFormatter": "dprint.dprint" + }, "cSpell.advanced.feature.useReferenceProviderWithRename": true, "cSpell.checkOnlyEnabledFileTypes": false, "cSpell.numSuggestions": 3, diff --git a/cspell.config.yaml b/cspell.config.yaml index 072d75fd..2753c0b0 100644 --- a/cspell.config.yaml +++ b/cspell.config.yaml @@ -81,6 +81,7 @@ words: - noreply - nothrow - npmrc + - nvmrc - Opencppcoverage - OSSDK - papm