mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
ci: add -j4
This commit is contained in:
parent
91e5b8dd16
commit
6a246cf4ad
4 changed files with 18 additions and 17 deletions
|
|
@ -7,5 +7,5 @@ jobs:
|
||||||
- run: nix-channel --list && nix-channel --update
|
- run: nix-channel --list && nix-channel --update
|
||||||
- run: nix-shell -p git --command 'git clone --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .'
|
- run: nix-shell -p git --command 'git clone --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .'
|
||||||
- run: whoami && pwd && ls -al
|
- run: whoami && pwd && ls -al
|
||||||
- run: nix-shell --command 'cloc src/ && cloc . && rustup install nightly && cargo version -vv && just cov && cargo doc && cargo build --release' .forgejo/workflows/build.nix
|
- run: nix-shell --command 'cloc src/ && cloc . && rustup install nightly && cargo version -vv && just cov && cargo doc -j4 && cargo build -j4 --release' .forgejo/workflows/build.nix
|
||||||
#- run: nix-shell -p docker --command "docker run --security-opt seccomp=unconfined -v $PWD:/volume xd009642/tarpaulin cargo tarpaulin --out Html --all-features"
|
#- run: nix-shell -p docker --command "docker run --security-opt seccomp=unconfined -v $PWD:/volume xd009642/tarpaulin cargo tarpaulin --out Html --all-features"
|
||||||
|
|
|
||||||
2
Justfile
2
Justfile
|
|
@ -24,7 +24,7 @@ doc:
|
||||||
covfig := "CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' RUSTDOCFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cov/cargo-test-%p-%m.profraw'"
|
covfig := "CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' RUSTDOCFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cov/cargo-test-%p-%m.profraw'"
|
||||||
cov:
|
cov:
|
||||||
rm -rf target/coverage/html || true
|
rm -rf target/coverage/html || true
|
||||||
{{covfig}} time cargo test --workspace --exclude jack --profile coverage
|
{{covfig}} time cargo test -j4 --workspace --exclude jack --profile coverage
|
||||||
{{covfig}} time grcov . --binary-path ./target/coverage/deps/ -s . -t html --ignore-not-existing --ignore '../*' --ignore "/*" --ignore 'target/*' -o target/coverage/html
|
{{covfig}} time grcov . --binary-path ./target/coverage/deps/ -s . -t html --ignore-not-existing --ignore '../*' --ignore "/*" --ignore 'target/*' -o target/coverage/html
|
||||||
llcov:
|
llcov:
|
||||||
time cargo llvm-cov --workspace --exclude jack --profile coverage --no-report
|
time cargo llvm-cov --workspace --exclude jack --profile coverage --no-report
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ impl Tek {
|
||||||
.map(|clip|clip.read().unwrap().name.clone()))
|
.map(|clip|clip.read().unwrap().name.clone()))
|
||||||
.flatten().as_ref()))),
|
.flatten().as_ref()))),
|
||||||
Thunk::new(||Tui::bg(Reset, " ------ "))));
|
Thunk::new(||Tui::bg(Reset, " ------ "))));
|
||||||
let nexts = self.row_top(w, 1, Align::e("Next:"), nexts, ());
|
let nexts = self.row_top(w, 2, Align::ne("Next:"), nexts, ());
|
||||||
let froms = self.per_track_top(|_, _|Tui::bg(Reset, Align::c(Bsp::s(" ------ ", OctaveVertical::default(),))));
|
let froms = self.per_track_top(|_, _|Tui::bg(Reset, Align::c(Bsp::s(" ------ ", OctaveVertical::default(),))));
|
||||||
let froms = self.row_top(w, 2, Align::e("From:"), froms, ());
|
let froms = self.row_top(w, 2, Align::ne("From:"), froms, ());
|
||||||
let ports = self.row_top(w, 1,
|
let ports = self.row_top(w, 1,
|
||||||
self.button3("o", "midi outs", format!("{}", self.midi_outs.len())),
|
self.button3("o", "midi outs", format!("{}", self.midi_outs.len())),
|
||||||
self.per_track_top(move|t, track|{
|
self.per_track_top(move|t, track|{
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@ impl Tek {
|
||||||
const H_SCENE: usize = 2;
|
const H_SCENE: usize = 2;
|
||||||
const H_EDITOR: usize = 15;
|
const H_EDITOR: usize = 15;
|
||||||
pub(crate) fn h_scenes (&self, editing: bool, height: usize, larger: usize) -> u16 {
|
pub(crate) fn h_scenes (&self, editing: bool, height: usize, larger: usize) -> u16 {
|
||||||
self.scenes_sizes(editing, height, larger).last().map(|(_, _, _, y)|y as u16).unwrap_or(0)
|
self.scenes_sizes(editing, height, larger).last().map(|(_, _, _, y)|y as u16).unwrap_or(0) }
|
||||||
}
|
|
||||||
pub(crate) fn scenes_sizes (&self, editing: bool, height: usize, larger: usize) -> impl ScenesSizes<'_> {
|
pub(crate) fn scenes_sizes (&self, editing: bool, height: usize, larger: usize) -> impl ScenesSizes<'_> {
|
||||||
let (selected_track, selected_scene) = match self.selected() {
|
let (selected_track, selected_scene) = match self.selected() {
|
||||||
Selection::Track(t) => (Some(*t), None),
|
Selection::Track(t) => (Some(*t), None),
|
||||||
|
|
@ -27,17 +26,19 @@ impl Tek {
|
||||||
let selected_track = self.selected().track();
|
let selected_track = self.selected().track();
|
||||||
let selected_scene = self.selected().scene();
|
let selected_scene = self.selected().scene();
|
||||||
let h = self.h_scenes(editing, Self::H_SCENE, Self::H_EDITOR);
|
let h = self.h_scenes(editing, Self::H_SCENE, Self::H_EDITOR);
|
||||||
let scene_names = Map::new(
|
let scrollbar = Fill::y(Fixed::x(1, RepeatV(" ")));
|
||||||
move||self.scenes_with_colors(editing, h_area),
|
Tui::bg(Reset, Fixed::y(self.h_tracks_area(), self.row(self.w_tracks_area(), h,
|
||||||
move|(s, scene, y1, y2, prev): SceneColor, _|self.view_scene_name(
|
Bsp::e(scrollbar, Map::new(
|
||||||
w_full, (1 + y2 - y1) as u16, y1 as u16, s, scene, prev));
|
move||self.scenes_with_colors(editing, h_area),
|
||||||
let scene_clips = self.per_track(move|t, track|Map::new(
|
move|(s, scene, y1, y2, prev): SceneColor, _|self.view_scene_name(
|
||||||
move||self.scenes_with_track_colors(editing, h_area, t),
|
w_full, (1 + y2 - y1) as u16, y1 as u16, s, scene, prev))),
|
||||||
move|(s, scene, y1, y2, prev): SceneColor, _|self.view_scene_clip(
|
self.per_track(move|t, track|Map::new(
|
||||||
w, (1 + y2 - y1) as u16, y1 as u16,
|
move||self.scenes_with_track_colors(editing, h_area, t),
|
||||||
scene, prev, s, t, editing, selected_track == Some(t), selected_scene)));
|
move|(s, scene, y1, y2, prev): SceneColor, _|self.view_scene_clip(
|
||||||
Tui::bg(Reset, Fixed::y(self.h_tracks_area(),
|
w, (1 + y2 - y1) as u16, y1 as u16,
|
||||||
self.row(self.w_tracks_area(), h, scene_names, scene_clips, ()))) }
|
scene, prev, s, t, editing, selected_track == Some(t), selected_scene))),
|
||||||
|
(),
|
||||||
|
))) }
|
||||||
fn scenes_with_colors (&self, editing: bool, h: u16) -> impl ScenesColors<'_> {
|
fn scenes_with_colors (&self, editing: bool, h: u16) -> impl ScenesColors<'_> {
|
||||||
self.scenes_sizes(editing, Self::H_SCENE, Self::H_EDITOR).map_while(
|
self.scenes_sizes(editing, Self::H_SCENE, Self::H_EDITOR).map_while(
|
||||||
move|(s, scene, y1, y2)|if y2 as u16 > h {
|
move|(s, scene, y1, y2)|if y2 as u16 > h {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue