From 7958f51d31b363841a5273be77978bcf435a85da Mon Sep 17 00:00:00 2001 From: "K.J. Valencik" Date: Mon, 30 Aug 2021 14:44:31 -0400 Subject: [PATCH] Run CI on release branches --- .github/workflows/lint.yml | 41 +++++++++++----------- .github/workflows/linux.yml | 39 +++++++++++---------- .github/workflows/macos.yml | 43 ++++++++++++----------- .github/workflows/windows.yml | 65 ++++++++++++++++++----------------- 4 files changed, 96 insertions(+), 92 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3dded6b2a..1a0a9ec66 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,10 +5,11 @@ on: # Prevent duplicate runs of this workflow on our own internal PRs. branches: - main + - next/* pull_request: branches: - main - + - next/* jobs: lint: @@ -16,24 +17,24 @@ jobs: strategy: matrix: - node-version: [14.x] - rust-toolchain: [nightly] + node-version: [ 14.x ] + rust-toolchain: [ nightly ] steps: - - uses: actions/checkout@v2 - - name: Use Rust ${{ matrix.rust-toolchain }} - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust-toolchain }} - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: install build-essential - run: sudo apt-get install -y build-essential - - name: Formatting - run: cargo fmt --all -- --check - - name: Clippy (N-API) - run: cargo clippy-napi - - name: Clippy (Legacy) - run: cargo clippy-legacy + - uses: actions/checkout@v2 + - name: Use Rust ${{ matrix.rust-toolchain }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust-toolchain }} + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: install build-essential + run: sudo apt-get install -y build-essential + - name: Formatting + run: cargo fmt --all -- --check + - name: Clippy (N-API) + run: cargo clippy-napi + - name: Clippy (Legacy) + run: cargo clippy-legacy diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ca15ff8a4..b790abf33 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -5,10 +5,11 @@ on: # Prevent duplicate runs of this workflow on our own internal PRs. branches: - main + - next/* pull_request: branches: - main - + - next/* jobs: build: @@ -16,23 +17,23 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x, 16.x] - rust-toolchain: [stable, beta, nightly] + node-version: [ 12.x, 14.x, 16.x ] + rust-toolchain: [ stable, beta, nightly ] steps: - - uses: actions/checkout@v2 - - name: Use Rust ${{ matrix.rust-toolchain }} - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust-toolchain }} - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: install build-essential - run: sudo apt-get install -y build-essential - - name: run cargo test - run: xvfb-run --auto-servernum cargo neon-test -- --nocapture - - name: run CLI test - working-directory: ./create-neon - run: npm test + - uses: actions/checkout@v2 + - name: Use Rust ${{ matrix.rust-toolchain }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust-toolchain }} + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: install build-essential + run: sudo apt-get install -y build-essential + - name: run cargo test + run: xvfb-run --auto-servernum cargo neon-test -- --nocapture + - name: run CLI test + working-directory: ./create-neon + run: npm test diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a4bd6ad1d..0dfe4fa33 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -5,10 +5,11 @@ on: # Prevent duplicate runs of this workflow on our own internal PRs. branches: - main + - next/* pull_request: branches: - main - + - next/* jobs: build: @@ -16,25 +17,25 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x, 16.x] - rust-toolchain: [stable, beta, nightly] + node-version: [ 12.x, 14.x, 16.x ] + rust-toolchain: [ stable, beta, nightly ] steps: - - uses: actions/checkout@v2 - - name: Use Rust ${{ matrix.rust-toolchain }} - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust-toolchain }} - target: x86_64-apple-darwin - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - # - name: update node-gyp to latest - # # https://github.com/nodejs/node-gyp/issues/1933#issuecomment-586915535 - # run: npm install -g node-gyp@latest - - name: run cargo test - run: cargo neon-test - - name: run CLI test - working-directory: ./create-neon - run: npm test + - uses: actions/checkout@v2 + - name: Use Rust ${{ matrix.rust-toolchain }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust-toolchain }} + target: x86_64-apple-darwin + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + # - name: update node-gyp to latest + # # https://github.com/nodejs/node-gyp/issues/1933#issuecomment-586915535 + # run: npm install -g node-gyp@latest + - name: run cargo test + run: cargo neon-test + - name: run CLI test + working-directory: ./create-neon + run: npm test diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5f699de4e..b6fb4cf2c 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -5,10 +5,11 @@ on: # Prevent duplicate runs of this workflow on our own internal PRs. branches: - main + - next/* pull_request: branches: - main - + - next/* jobs: build: @@ -16,36 +17,36 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x, 16.x] - rust-toolchain: [stable, beta, nightly] + node-version: [ 12.x, 14.x, 16.x ] + rust-toolchain: [ stable, beta, nightly ] steps: - - uses: actions/checkout@v2 - - name: Use Rust ${{ matrix.rust-toolchain }} - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust-toolchain }} - target: x86_64-pc-windows-msvc - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Use npm v6 - if: ${{ matrix.node-version == '16.x' }} - run: npm install -g npm@6 - - name: Install libclang - uses: KyleMayes/install-llvm-action@01144dc97b1e2693196c3056414a44f15180648b - with: - version: "10" - directory: ${{ runner.temp }}/llvm - # - name: update node-gyp to latest - # # https://github.com/nodejs/node-gyp/issues/1933#issuecomment-586915535 - # run: npm install -g node-gyp@latest - - run: npm config set msvs_version 2019 - - name: run cargo test - run: cargo neon-test - env: - LIBCLANG_PATH: ${{ runner.temp }}/llvm/bin - - name: run CLI test - working-directory: ./create-neon - run: npm test + - uses: actions/checkout@v2 + - name: Use Rust ${{ matrix.rust-toolchain }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust-toolchain }} + target: x86_64-pc-windows-msvc + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Use npm v6 + if: ${{ matrix.node-version == '16.x' }} + run: npm install -g npm@6 + - name: Install libclang + uses: KyleMayes/install-llvm-action@01144dc97b1e2693196c3056414a44f15180648b + with: + version: "10" + directory: ${{ runner.temp }}/llvm + # - name: update node-gyp to latest + # # https://github.com/nodejs/node-gyp/issues/1933#issuecomment-586915535 + # run: npm install -g node-gyp@latest + - run: npm config set msvs_version 2019 + - name: run cargo test + run: cargo neon-test + env: + LIBCLANG_PATH: ${{ runner.temp }}/llvm/bin + - name: run CLI test + working-directory: ./create-neon + run: npm test