Skip to content

Commit 3a9fd70

Browse files
committed
chore: standardize environment variables and font installation
- 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
1 parent 44cb425 commit 3a9fd70

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ on:
77

88
defaults:
99
run:
10-
shell: bash # necessary for windows
10+
shell: bash
11+
12+
env:
13+
FONTS: "Monaspace FiraCode ProFont CascadiaCode Noto"
14+
VERSION: "v3.2.1"
15+
EXTENSION: ".zip"
1116

1217
jobs:
1318
fmt:
@@ -116,12 +121,10 @@ jobs:
116121
brew install font-monaspace-nerd-font
117122
brew install font-noto-nerd-font
118123
elif [[ $RUNNER_OS == "Linux" ]]; then
119-
VERSION="v3.2.1"
120-
EXTENSION=".zip"
121124
FONT_DIR="${HOME}/.local/share/fonts"
122125
mkdir -p "$FONT_DIR"
123126
124-
for font in "${fonts[@]}"; do
127+
for font in ${{ env.FONTS }}; do
125128
ZIP_FILE="${font}${EXTENSION}"
126129
if [[ "$font" == "Monaspace" ]]; then
127130
DOWNLOAD_URL="https://github.com/githubnext/monaspace/releases/download/v1.101/monaspace-v1.101.zip"

src/renderer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl Renderer {
248248
// | Features::TIMESTAMP_QUERY_INSIDE_ENCODERS
249249
}
250250

251-
#[cfg(not(any(target_os = "macos", target_os = "linux")))]
251+
#[cfg(target_os = "windows")]
252252
{
253253
Features::PUSH_CONSTANTS
254254
| Features::SPIRV_SHADER_PASSTHROUGH

0 commit comments

Comments
 (0)