-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
1,923 additions
and
1,357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then | ||
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM=" | ||
fi | ||
|
||
use flake |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]> | ||
|
||
SPDX-License-Identifier: CC-BY-NC-SA-4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,37 @@ | ||
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
Output .github/demo.gif | ||
|
||
Set Shell "bash" | ||
Set Shell "fish" | ||
Set FontFamily "RyanTerm Nerd Font" | ||
Set FontSize 40 | ||
Set LineHeight 1.5 | ||
Set Framerate 60 | ||
Set PlaybackSpeed 0.5 | ||
Set Width 2400 | ||
Set Height 1200 | ||
Set Theme "Rose Pine" | ||
Set Theme "Catppuccin Macchiato" | ||
|
||
Hide | ||
|
||
Type@0 'cargo build -r' Enter Sleep 1s | ||
|
||
Type@0 'export NYOOM_TEMP_CONFIG="$(mktemp -d)/nyoom.toml"' Enter Sleep 1s | ||
Type@0 'export NYOOM_TEMP_PROFILE="$(mktemp -d)"' Enter Sleep 1s | ||
Type@0 'set -x NYOOM_TEMP_CONFIG "$(mktemp -d)/nyoom.toml"' Enter Sleep 1s | ||
Type@0 'set -x NYOOM_TEMP_PROFILE "$(mktemp -d)"' Enter Sleep 1s | ||
|
||
Type@0 'touch "$NYOOM_TEMP_PROFILE/user-overrides.js"' Enter Sleep 1s | ||
Type@0 'touch "$NYOOM_TEMP_PROFILE/user.js"' Enter Sleep 1s | ||
Type@0 'echo "#!/bin/bash" > "$NYOOM_TEMP_PROFILE/updater.sh" && chmod +x "$NYOOM_TEMP_PROFILE/updater.sh"' Enter Sleep 1s | ||
Type@0 'echo "#!/bin/bash" > "$NYOOM_TEMP_PROFILE/prefsCleaner.sh" && chmod +x "$NYOOM_TEMP_PROFILE/prefsCleaner.sh"' Enter Sleep 1s | ||
Type@0 'echo "#!/bin/sh" > "$NYOOM_TEMP_PROFILE/updater.sh" && chmod +x "$NYOOM_TEMP_PROFILE/updater.sh"' Enter Sleep 1s | ||
Type@0 'echo "#!/bin/sh" > "$NYOOM_TEMP_PROFILE/prefsCleaner.sh" && chmod +x "$NYOOM_TEMP_PROFILE/prefsCleaner.sh"' Enter Sleep 1s | ||
|
||
Type@0 'alias nyoom="./target/release/nyoom -c $NYOOM_TEMP_CONFIG"' Enter Sleep 1s | ||
Type@0 'alias ls="exa" cat="bat --style=plain"' Enter Sleep 1s | ||
Type@0 'alias ls="eza" cat="bat --style=plain"' Enter Sleep 1s | ||
Type@0 'nyoom profile "$NYOOM_TEMP_PROFILE"' Enter Sleep 1s | ||
|
||
Type@0 'export PS1="\033[2m$ \033[22m"' Enter Sleep 1s | ||
# https://github.com/sharkdp/vivid/pull/108 | ||
Type@0 'export LS_COLORS="$(vivid generate rose-pine)"' Enter Sleep 1s | ||
Type@0 'fish_config theme choose "Catppuccin Macchiato"' Enter Sleep 1s | ||
Type@0 'set fish_autosuggestion_enabled 0' Enter Sleep 1s | ||
Type@0 'function fish_prompt; echo "$(set_color -d)\$$(set_color normal) "; end' Enter Sleep 1s | ||
Type@0 'set -x LS_COLORS "$(vivid generate catppuccin-macchiato)"' Enter Sleep 1s | ||
|
||
Type@0 'clear' Enter | ||
Sleep 1s | ||
|
@@ -70,6 +73,7 @@ Sleep 2s | |
|
||
Type 'nyoom switch edge' Sleep 500ms Enter | ||
Sleep 10s | ||
Screenshot .github/demo.png | ||
|
||
Hide | ||
Type 'cd "$NYOOM_TEMP_PROFILE"' Enter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
version: 2 | ||
|
||
updates: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,40 @@ | ||
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
name: Build | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
tags-ignore: | ||
- "**" | ||
pull_request: | ||
branches: ["main"] | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
permissions: | ||
id-token: write | ||
attestations: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: | ||
- "x86_64-unknown-linux-musl" | ||
- "aarch64-unknown-linux-musl" | ||
- "x86_64-pc-windows-msvc" | ||
- "x86_64-apple-darwin" | ||
- "aarch64-apple-darwin" | ||
- aarch64-apple-darwin | ||
- x86_64-apple-darwin | ||
- aarch64-pc-windows-msvc | ||
- x86_64-pc-windows-msvc | ||
include: | ||
- target: "x86_64-unknown-linux-musl" | ||
runner: ubuntu-latest | ||
- target: "aarch64-unknown-linux-musl" | ||
runner: ubuntu-latest | ||
- target: "x86_64-pc-windows-msvc" | ||
runner: windows-latest | ||
- target: "x86_64-apple-darwin" | ||
- target: aarch64-apple-darwin | ||
runner: macos-latest | ||
- target: "aarch64-apple-darwin" | ||
- target: x86_64-apple-darwin | ||
runner: macos-latest | ||
- target: aarch64-pc-windows-msvc | ||
runner: windows-latest | ||
- target: x86_64-pc-windows-msvc | ||
runner: windows-latest | ||
fail-fast: false | ||
|
||
runs-on: ${{ matrix.runner }} | ||
|
||
|
@@ -42,20 +46,72 @@ jobs: | |
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
targets: ${{ matrix.target }} | ||
target: ${{ matrix.target }} | ||
|
||
- name: Setup Rust cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Install cargo-auditable | ||
run: cargo install cargo-auditable | ||
|
||
- name: Build | ||
id: build | ||
run: ./scripts/build.sh | ||
shell: bash | ||
run: cargo auditable build --release --locked --target ${{ matrix.target }} | ||
env: | ||
TARGET: ${{ matrix.target }} | ||
CARGO_PROFILE_RELEASE_LTO: "fat" | ||
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: "1" | ||
|
||
- name: Generate build provenance attestations | ||
uses: actions/attest-build-provenance@v1 | ||
if: ${{ github.event_name != 'pull_request' }} | ||
with: | ||
subject-path: | | ||
./target/${{ matrix.target }}/release/nyoom | ||
./target/${{ matrix.target }}/release/nyoom.exe | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
if-no-files-found: "error" | ||
name: nyoom-${{ matrix.target }} | ||
path: | | ||
./target/${{ matrix.target }}/release/nyoom | ||
./target/${{ matrix.target }}/release/nyoom.exe | ||
linux-static: | ||
permissions: | ||
id-token: write | ||
attestations: write | ||
|
||
strategy: | ||
matrix: | ||
target: | ||
- "x86_64-unknown-linux-musl" | ||
- "aarch64-unknown-linux-musl" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: Setup Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Build | ||
run: nix build --fallback --print-build-logs '.#nyoom-static-${{ matrix.target }}' | ||
|
||
- name: Generate build provenance attestations | ||
uses: actions/attest-build-provenance@v1 | ||
if: ${{ github.event_name != 'pull_request' }} | ||
with: | ||
subject-path: ./result/bin/nyoom | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
if-no-files-found: "error" | ||
name: nyoom-${{ matrix.target }} | ||
path: ${{ steps.build.outputs.path }} | ||
path: ./result/bin/nyoom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# SPDX-FileCopyrightText: 2024 Ryan Cao <[email protected]> | ||
# | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
name: Check | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
clippy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: Setup Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Check | ||
run: nix build --fallback --print-build-logs '.#check-clippy' | ||
|
||
- name: Upload analysis results | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: result | ||
wait-for-processing: true | ||
|
||
rustfmt: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: Setup Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Check | ||
run: nix build --fallback --print-build-logs '.#check-rustfmt' | ||
|
||
nixfmt: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: Setup Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Check | ||
run: nix build --fallback --print-build-logs '.#check-nixfmt' | ||
|
||
reuse: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@main | ||
|
||
- name: Setup Nix cache | ||
uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Check | ||
run: nix build --fallback --print-build-logs '.#check-reuse' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.