mirror of
https://github.com/nushell/nushell
synced 2025-01-13 13:49:21 +00:00
Try removing debuginfo for ci builds (#5549)
* Try removing debuginfo for ci builds * oops, wrong inherits * extra flag * nextest doesn't support --profile in the same way * try to allow for a ci-specific target * Oops, run more tests
This commit is contained in:
parent
d90b25c633
commit
c6383874e9
3 changed files with 33 additions and 12 deletions
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
|
@ -9,13 +9,15 @@ name: continuous-integration
|
||||||
jobs:
|
jobs:
|
||||||
nu-fmt-clippy:
|
nu-fmt-clippy:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
platform: [windows-latest, macos-latest, ubuntu-latest]
|
platform: [windows-latest, macos-latest, ubuntu-latest]
|
||||||
rust:
|
rust:
|
||||||
- stable
|
- stable
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
env:
|
||||||
|
NUSHELL_CARGO_TARGET: ci
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -45,8 +47,11 @@ jobs:
|
||||||
args: --features=extra --workspace --exclude nu_plugin_* -- -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
|
||||||
|
|
||||||
nu-tests:
|
nu-tests:
|
||||||
|
env:
|
||||||
|
NUSHELL_CARGO_TARGET: ci
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
platform: [windows-latest, macos-latest, ubuntu-latest]
|
platform: [windows-latest, macos-latest, ubuntu-latest]
|
||||||
style: [extra, default]
|
style: [extra, default]
|
||||||
|
@ -79,23 +84,26 @@ jobs:
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.style }}v1 # increment this to bust the cache if needed
|
key: ${{ matrix.style }}v1 # increment this to bust the cache if needed
|
||||||
|
|
||||||
- uses: taiki-e/install-action@nextest
|
# - uses: taiki-e/install-action@nextest
|
||||||
|
|
||||||
- name: Tests
|
- name: Tests
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: nextest
|
command: test
|
||||||
args: run --workspace --exclude nu_plugin_* ${{ matrix.flags }}
|
args: --workspace --profile ci --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 --exclude nu_plugin_* --doc ${{ matrix.flags }}
|
args: --workspace --profile ci --exclude nu_plugin_* --doc ${{ matrix.flags }}
|
||||||
|
|
||||||
python-virtualenv:
|
python-virtualenv:
|
||||||
|
env:
|
||||||
|
NUSHELL_CARGO_TARGET: ci
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
rust:
|
rust:
|
||||||
|
@ -123,7 +131,7 @@ jobs:
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: install
|
command: install
|
||||||
args: --path=. --no-default-features --debug
|
args: --path=. --profile ci --no-default-features
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
|
@ -146,8 +154,11 @@ jobs:
|
||||||
# Build+test plugins on their own, without the rest of Nu. This helps with CI parallelization and
|
# 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
|
# also helps test that the plugins build without any feature unification shenanigans
|
||||||
plugins:
|
plugins:
|
||||||
|
env:
|
||||||
|
NUSHELL_CARGO_TARGET: ci
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
platform: [windows-latest, macos-latest, ubuntu-latest]
|
platform: [windows-latest, macos-latest, ubuntu-latest]
|
||||||
rust:
|
rust:
|
||||||
|
@ -175,4 +186,4 @@ jobs:
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --package nu_plugin_*
|
args: --profile ci --package nu_plugin_*
|
||||||
|
|
|
@ -103,6 +103,13 @@ inherits = "release"
|
||||||
strip = false
|
strip = false
|
||||||
debug = true
|
debug = true
|
||||||
|
|
||||||
|
# build with `cargo build --profile ci`
|
||||||
|
# to analyze performance with tooling like linux perf
|
||||||
|
[profile.ci]
|
||||||
|
inherits = "dev"
|
||||||
|
strip = false
|
||||||
|
debug = false
|
||||||
|
|
||||||
# Main nu binary
|
# Main nu binary
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "nu"
|
name = "nu"
|
||||||
|
|
|
@ -246,9 +246,12 @@ pub fn root() -> PathBuf {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn binaries() -> PathBuf {
|
pub fn binaries() -> PathBuf {
|
||||||
let mut build_type = "debug";
|
let mut build_type = "debug".to_string();
|
||||||
if !cfg!(debug_assertions) {
|
if !cfg!(debug_assertions) {
|
||||||
build_type = "release"
|
build_type = "release".to_string()
|
||||||
|
}
|
||||||
|
if let Ok(target) = std::env::var("NUSHELL_CARGO_TARGET") {
|
||||||
|
build_type = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::env::var("CARGO_TARGET_DIR")
|
std::env::var("CARGO_TARGET_DIR")
|
||||||
|
|
Loading…
Reference in a new issue