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
This commit is contained in:
Reilly Wood 2022-05-13 04:40:46 -07:00 committed by GitHub
parent 32d1939a95
commit 65bac77e8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,24 +7,13 @@ on:
name: continuous-integration name: continuous-integration
jobs: jobs:
build-clippy: nu-fmt-clippy:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: [windows-latest, macos-latest, ubuntu-latest] platform: [windows-latest, macos-latest, ubuntu-latest]
style: [all, default]
rust: rust:
- stable - 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 }} runs-on: ${{ matrix.platform }}
@ -41,7 +30,7 @@ jobs:
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
with: 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 - name: Rustfmt
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
@ -49,29 +38,23 @@ jobs:
command: fmt command: fmt
args: --all -- --check args: --all -- --check
- name: Build Nushell
uses: actions-rs/cargo@v1
with:
command: build
args: --workspace ${{ matrix.flags }}
- name: Clippy - name: Clippy
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: clippy 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: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
platform: [windows-latest, macos-latest, ubuntu-latest] platform: [windows-latest, macos-latest, ubuntu-latest]
style: [all, default] style: [extra, default]
rust: rust:
- stable - stable
include: include:
- style: all - style: extra
flags: "--all-features" flags: "--features=extra"
- style: default - style: default
flags: "" flags: ""
exclude: exclude:
@ -91,7 +74,6 @@ jobs:
profile: minimal profile: minimal
toolchain: ${{ matrix.rust }} toolchain: ${{ matrix.rust }}
override: true override: true
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
with: with:
@ -103,13 +85,13 @@ jobs:
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: nextest command: nextest
args: run --all ${{ matrix.flags }} args: run --workspace --exclude nu_plugin_* ${{ matrix.flags }}
- name: Doctests - name: Doctests
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: test command: test
args: --workspace --doc ${{ matrix.flags }} args: --workspace --exclude nu_plugin_* --doc ${{ matrix.flags }}
python-virtualenv: python-virtualenv:
strategy: strategy:
@ -161,6 +143,8 @@ jobs:
run: cd virtualenv && tox -e ${{ matrix.py }} -- -k nushell run: cd virtualenv && tox -e ${{ matrix.py }} -- -k nushell
shell: bash 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: plugins:
strategy: strategy:
fail-fast: false fail-fast: false
@ -181,29 +165,14 @@ jobs:
toolchain: ${{ matrix.rust }} toolchain: ${{ matrix.rust }}
override: true override: true
# This job does not use rust-cache because 1) we have limited cache space, 2) even - name: Clippy
# without caching, it's not the slowest job. Revisit if those facts change.
- name: Build nu_plugin_example
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: build command: clippy
args: --package nu_plugin_example 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 uses: actions-rs/cargo@v1
with: with:
command: build command: test
args: --package nu_plugin_gstat args: --package nu_plugin_*
- 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