Skip to content

Commit

Permalink
chore: standardize environment variables and font installation
Browse files Browse the repository at this point in the history
- remove unnecessary comment about shell for running on windows
- add environment variables for fonts, version, and extension
- modify font installation loop to use environment variables
- update target operating system condition in renderer.rs
  • Loading branch information
falcucci committed Sep 19, 2024
1 parent 44cb425 commit 3a9fd70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ on:

defaults:
run:
shell: bash # necessary for windows
shell: bash

env:
FONTS: "Monaspace FiraCode ProFont CascadiaCode Noto"
VERSION: "v3.2.1"
EXTENSION: ".zip"

jobs:
fmt:
Expand Down Expand Up @@ -116,12 +121,10 @@ jobs:
brew install font-monaspace-nerd-font
brew install font-noto-nerd-font
elif [[ $RUNNER_OS == "Linux" ]]; then
VERSION="v3.2.1"
EXTENSION=".zip"
FONT_DIR="${HOME}/.local/share/fonts"
mkdir -p "$FONT_DIR"
for font in "${fonts[@]}"; do
for font in ${{ env.FONTS }}; do
ZIP_FILE="${font}${EXTENSION}"
if [[ "$font" == "Monaspace" ]]; then
DOWNLOAD_URL="https://github.com/githubnext/monaspace/releases/download/v1.101/monaspace-v1.101.zip"
Expand Down
2 changes: 1 addition & 1 deletion src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ impl Renderer {
// | Features::TIMESTAMP_QUERY_INSIDE_ENCODERS
}

#[cfg(not(any(target_os = "macos", target_os = "linux")))]
#[cfg(target_os = "windows")]
{
Features::PUSH_CONSTANTS
| Features::SPIRV_SHADER_PASSTHROUGH
Expand Down

0 comments on commit 3a9fd70

Please sign in to comment.