Skip to content

Commit 4c25788

Browse files
committed
feat: v0.8.0, overhaul
1 parent 63e9c00 commit 4c25788

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1923
-1357
lines changed

.envrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
6+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
7+
fi
8+
19
use flake

.github/demo.gif

104 KB
Loading

.github/demo.gif.license

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]>
2+
3+
SPDX-License-Identifier: CC-BY-NC-SA-4.0

scripts/demo.tape renamed to .github/demo.tape

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
1+
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
15
Output .github/demo.gif
26

3-
Set Shell "bash"
7+
Set Shell "fish"
48
Set FontFamily "RyanTerm Nerd Font"
59
Set FontSize 40
610
Set LineHeight 1.5
711
Set Framerate 60
812
Set PlaybackSpeed 0.5
913
Set Width 2400
1014
Set Height 1200
11-
Set Theme "Rose Pine"
15+
Set Theme "Catppuccin Macchiato"
1216

1317
Hide
1418

15-
Type@0 'cargo build -r' Enter Sleep 1s
16-
17-
Type@0 'export NYOOM_TEMP_CONFIG="$(mktemp -d)/nyoom.toml"' Enter Sleep 1s
18-
Type@0 'export NYOOM_TEMP_PROFILE="$(mktemp -d)"' Enter Sleep 1s
19+
Type@0 'set -x NYOOM_TEMP_CONFIG "$(mktemp -d)/nyoom.toml"' Enter Sleep 1s
20+
Type@0 'set -x NYOOM_TEMP_PROFILE "$(mktemp -d)"' Enter Sleep 1s
1921

2022
Type@0 'touch "$NYOOM_TEMP_PROFILE/user-overrides.js"' Enter Sleep 1s
2123
Type@0 'touch "$NYOOM_TEMP_PROFILE/user.js"' Enter Sleep 1s
22-
Type@0 'echo "#!/bin/bash" > "$NYOOM_TEMP_PROFILE/updater.sh" && chmod +x "$NYOOM_TEMP_PROFILE/updater.sh"' Enter Sleep 1s
23-
Type@0 'echo "#!/bin/bash" > "$NYOOM_TEMP_PROFILE/prefsCleaner.sh" && chmod +x "$NYOOM_TEMP_PROFILE/prefsCleaner.sh"' Enter Sleep 1s
24+
Type@0 'echo "#!/bin/sh" > "$NYOOM_TEMP_PROFILE/updater.sh" && chmod +x "$NYOOM_TEMP_PROFILE/updater.sh"' Enter Sleep 1s
25+
Type@0 'echo "#!/bin/sh" > "$NYOOM_TEMP_PROFILE/prefsCleaner.sh" && chmod +x "$NYOOM_TEMP_PROFILE/prefsCleaner.sh"' Enter Sleep 1s
2426

2527
Type@0 'alias nyoom="./target/release/nyoom -c $NYOOM_TEMP_CONFIG"' Enter Sleep 1s
26-
Type@0 'alias ls="exa" cat="bat --style=plain"' Enter Sleep 1s
28+
Type@0 'alias ls="eza" cat="bat --style=plain"' Enter Sleep 1s
2729
Type@0 'nyoom profile "$NYOOM_TEMP_PROFILE"' Enter Sleep 1s
2830

29-
Type@0 'export PS1="\033[2m$ \033[22m"' Enter Sleep 1s
30-
# https://github.com/sharkdp/vivid/pull/108
31-
Type@0 'export LS_COLORS="$(vivid generate rose-pine)"' Enter Sleep 1s
31+
Type@0 'fish_config theme choose "Catppuccin Macchiato"' Enter Sleep 1s
32+
Type@0 'set fish_autosuggestion_enabled 0' Enter Sleep 1s
33+
Type@0 'function fish_prompt; echo "$(set_color -d)\$$(set_color normal) "; end' Enter Sleep 1s
34+
Type@0 'set -x LS_COLORS "$(vivid generate catppuccin-macchiato)"' Enter Sleep 1s
3235

3336
Type@0 'clear' Enter
3437
Sleep 1s
@@ -70,6 +73,7 @@ Sleep 2s
7073

7174
Type 'nyoom switch edge' Sleep 500ms Enter
7275
Sleep 10s
76+
Screenshot .github/demo.png
7377

7478
Hide
7579
Type 'cd "$NYOOM_TEMP_PROFILE"' Enter

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]>
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
15
version: 2
26

37
updates:

.github/workflows/build.yml

Lines changed: 78 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,40 @@
1+
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
15
name: Build
26

37
on:
48
push:
59
branches: ["main"]
6-
tags-ignore:
7-
- "**"
810
pull_request:
11+
branches: ["main"]
912
workflow_call:
1013
workflow_dispatch:
1114

1215
jobs:
1316
build:
17+
permissions:
18+
id-token: write
19+
attestations: write
20+
1421
strategy:
15-
fail-fast: false
1622
matrix:
1723
target:
18-
- "x86_64-unknown-linux-musl"
19-
- "aarch64-unknown-linux-musl"
20-
- "x86_64-pc-windows-msvc"
21-
- "x86_64-apple-darwin"
22-
- "aarch64-apple-darwin"
24+
- aarch64-apple-darwin
25+
- x86_64-apple-darwin
26+
- aarch64-pc-windows-msvc
27+
- x86_64-pc-windows-msvc
2328
include:
24-
- target: "x86_64-unknown-linux-musl"
25-
runner: ubuntu-latest
26-
- target: "aarch64-unknown-linux-musl"
27-
runner: ubuntu-latest
28-
- target: "x86_64-pc-windows-msvc"
29-
runner: windows-latest
30-
- target: "x86_64-apple-darwin"
29+
- target: aarch64-apple-darwin
3130
runner: macos-latest
32-
- target: "aarch64-apple-darwin"
31+
- target: x86_64-apple-darwin
3332
runner: macos-latest
33+
- target: aarch64-pc-windows-msvc
34+
runner: windows-latest
35+
- target: x86_64-pc-windows-msvc
36+
runner: windows-latest
37+
fail-fast: false
3438

3539
runs-on: ${{ matrix.runner }}
3640

@@ -42,20 +46,72 @@ jobs:
4246
uses: dtolnay/rust-toolchain@stable
4347
with:
4448
toolchain: stable
45-
targets: ${{ matrix.target }}
49+
target: ${{ matrix.target }}
4650

4751
- name: Setup Rust cache
4852
uses: Swatinem/rust-cache@v2
4953

54+
- name: Install cargo-auditable
55+
run: cargo install cargo-auditable
56+
5057
- name: Build
51-
id: build
52-
run: ./scripts/build.sh
53-
shell: bash
58+
run: cargo auditable build --release --locked --target ${{ matrix.target }}
5459
env:
55-
TARGET: ${{ matrix.target }}
60+
CARGO_PROFILE_RELEASE_LTO: "fat"
61+
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1"
62+
63+
- name: Generate build provenance attestations
64+
uses: actions/attest-build-provenance@v1
65+
if: ${{ github.event_name != 'pull_request' }}
66+
with:
67+
subject-path: |
68+
./target/${{ matrix.target }}/release/nyoom
69+
./target/${{ matrix.target }}/release/nyoom.exe
5670
5771
- name: Upload artifacts
5872
uses: actions/upload-artifact@v4
5973
with:
74+
if-no-files-found: "error"
75+
name: nyoom-${{ matrix.target }}
76+
path: |
77+
./target/${{ matrix.target }}/release/nyoom
78+
./target/${{ matrix.target }}/release/nyoom.exe
79+
80+
linux-static:
81+
permissions:
82+
id-token: write
83+
attestations: write
84+
85+
strategy:
86+
matrix:
87+
target:
88+
- "x86_64-unknown-linux-musl"
89+
- "aarch64-unknown-linux-musl"
90+
91+
runs-on: ubuntu-latest
92+
93+
steps:
94+
- name: Checkout repository
95+
uses: actions/checkout@v4
96+
97+
- name: Install Nix
98+
uses: DeterminateSystems/nix-installer-action@main
99+
100+
- name: Setup Nix cache
101+
uses: DeterminateSystems/magic-nix-cache-action@main
102+
103+
- name: Build
104+
run: nix build --fallback --print-build-logs '.#nyoom-static-${{ matrix.target }}'
105+
106+
- name: Generate build provenance attestations
107+
uses: actions/attest-build-provenance@v1
108+
if: ${{ github.event_name != 'pull_request' }}
109+
with:
110+
subject-path: ./result/bin/nyoom
111+
112+
- name: Upload artifact
113+
uses: actions/upload-artifact@v4
114+
with:
115+
if-no-files-found: "error"
60116
name: nyoom-${{ matrix.target }}
61-
path: ${{ steps.build.outputs.path }}
117+
path: ./result/bin/nyoom

.github/workflows/check.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
name: Check
6+
7+
on:
8+
push:
9+
branches: ["main"]
10+
pull_request:
11+
branches: ["main"]
12+
13+
jobs:
14+
clippy:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
security-events: write
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Install Nix
24+
uses: DeterminateSystems/nix-installer-action@main
25+
26+
- name: Setup Nix cache
27+
uses: DeterminateSystems/magic-nix-cache-action@main
28+
29+
- name: Check
30+
run: nix build --fallback --print-build-logs '.#check-clippy'
31+
32+
- name: Upload analysis results
33+
uses: github/codeql-action/upload-sarif@v3
34+
with:
35+
sarif_file: result
36+
wait-for-processing: true
37+
38+
rustfmt:
39+
runs-on: ubuntu-latest
40+
41+
steps:
42+
- name: Checkout repository
43+
uses: actions/checkout@v4
44+
45+
- name: Install Nix
46+
uses: DeterminateSystems/nix-installer-action@main
47+
48+
- name: Setup Nix cache
49+
uses: DeterminateSystems/magic-nix-cache-action@main
50+
51+
- name: Check
52+
run: nix build --fallback --print-build-logs '.#check-rustfmt'
53+
54+
nixfmt:
55+
runs-on: ubuntu-latest
56+
57+
steps:
58+
- name: Checkout repository
59+
uses: actions/checkout@v4
60+
61+
- name: Install Nix
62+
uses: DeterminateSystems/nix-installer-action@main
63+
64+
- name: Setup Nix cache
65+
uses: DeterminateSystems/magic-nix-cache-action@main
66+
67+
- name: Check
68+
run: nix build --fallback --print-build-logs '.#check-nixfmt'
69+
70+
reuse:
71+
runs-on: ubuntu-latest
72+
73+
steps:
74+
- name: Checkout repository
75+
uses: actions/checkout@v4
76+
77+
- name: Install Nix
78+
uses: DeterminateSystems/nix-installer-action@main
79+
80+
- name: Setup Nix cache
81+
uses: DeterminateSystems/magic-nix-cache-action@main
82+
83+
- name: Check
84+
run: nix build --fallback --print-build-logs '.#check-reuse'

.github/workflows/clippy.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/nix.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)