From 65bac77e8a2d647fb50043f39897b540e7e7233d Mon Sep 17 00:00:00 2001 From: Reilly Wood <26268125+rgwood@users.noreply.github.com> Date: Fri, 13 May 2022 04:40:46 -0700 Subject: [PATCH] More CI work (#5527) * Add cache+docs to plugin CI job * CI perf: don't statically link OpenSSL * Run Clippy in plugin job * comment * bust cache * trigger build * remove nextest, split plugins better * trigger CI * try disabling embed-resource * try disabling libgit2 in shadow-rs * use lld linker on Windows * Skip embedding Windows resource (slow) during tests * disable shadow-rs git integration during tests * go back to simpler shadow-rs and embed-resources setup * some renaming * forgot nextest * trigger ci * Remove Clippy and unnecessary build * trigger CI * disable lld * reenable lld * cleanup * revert embed_resource change --- .github/workflows/ci.yml | 65 +++++++++++----------------------------- 1 file changed, 17 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b5ac25b8f..56c9657e83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,24 +7,13 @@ on: name: continuous-integration jobs: - build-clippy: + nu-fmt-clippy: strategy: fail-fast: false matrix: platform: [windows-latest, macos-latest, ubuntu-latest] - style: [all, default] rust: - stable - include: - - style: all - flags: "--all-features" - - style: default - flags: "" - exclude: - - platform: windows-latest - style: default - - platform: macos-latest - style: default runs-on: ${{ matrix.platform }} @@ -41,7 +30,7 @@ jobs: - uses: Swatinem/rust-cache@v1 with: - key: ${{ matrix.style }}v1 # increment this to bust the cache if needed + key: "v1" # increment this to bust the cache if needed - name: Rustfmt uses: actions-rs/cargo@v1 @@ -49,29 +38,23 @@ jobs: command: fmt args: --all -- --check - - name: Build Nushell - uses: actions-rs/cargo@v1 - with: - command: build - args: --workspace ${{ matrix.flags }} - - name: Clippy uses: actions-rs/cargo@v1 with: command: clippy - args: --workspace ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect + args: --features=extra --workspace --exclude nu_plugin_* -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect - test: + nu-tests: strategy: fail-fast: false matrix: platform: [windows-latest, macos-latest, ubuntu-latest] - style: [all, default] + style: [extra, default] rust: - stable include: - - style: all - flags: "--all-features" + - style: extra + flags: "--features=extra" - style: default flags: "" exclude: @@ -91,7 +74,6 @@ jobs: profile: minimal toolchain: ${{ matrix.rust }} override: true - components: rustfmt, clippy - uses: Swatinem/rust-cache@v1 with: @@ -103,13 +85,13 @@ jobs: uses: actions-rs/cargo@v1 with: command: nextest - args: run --all ${{ matrix.flags }} + args: run --workspace --exclude nu_plugin_* ${{ matrix.flags }} - name: Doctests uses: actions-rs/cargo@v1 with: command: test - args: --workspace --doc ${{ matrix.flags }} + args: --workspace --exclude nu_plugin_* --doc ${{ matrix.flags }} python-virtualenv: strategy: @@ -161,6 +143,8 @@ jobs: run: cd virtualenv && tox -e ${{ matrix.py }} -- -k nushell shell: bash + # Build+test plugins on their own, without the rest of Nu. This helps with CI parallelization and + # also helps test that the plugins build without any feature unification shenanigans plugins: strategy: fail-fast: false @@ -181,29 +165,14 @@ jobs: toolchain: ${{ matrix.rust }} override: true - # This job does not use rust-cache because 1) we have limited cache space, 2) even - # without caching, it's not the slowest job. Revisit if those facts change. - - - name: Build nu_plugin_example + - name: Clippy uses: actions-rs/cargo@v1 with: - command: build - args: --package nu_plugin_example + command: clippy + args: --package nu_plugin_* ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect - - name: Build nu_plugin_gstat + - name: Tests uses: actions-rs/cargo@v1 with: - command: build - args: --package nu_plugin_gstat - - - name: Build nu_plugin_inc - uses: actions-rs/cargo@v1 - with: - command: build - args: --package nu_plugin_inc - - - name: Build nu_plugin_query - uses: actions-rs/cargo@v1 - with: - command: build - args: --package nu_plugin_query + command: test + args: --package nu_plugin_*