1
1
mirror of https://github.com/wez/wezterm.git synced 2024-08-17 02:00:25 +03:00

ci: fixup perl path on windows when running tests

This commit is contained in:
Wez Furlong 2024-04-05 16:21:13 -07:00
parent 58cd230a45
commit 9b082e5355
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
4 changed files with 16 additions and 19 deletions

View File

@ -50,25 +50,21 @@ jobs:
- name: "Build wezterm (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p wezterm --release
- name: "Build wezterm-gui (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p wezterm-gui --release
- name: "Build wezterm-mux-server (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p wezterm-mux-server --release
- name: "Build strip-ansi-escapes (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p strip-ansi-escapes --release
- name: "Install cargo-nextest from Cargo"
@ -78,7 +74,9 @@ jobs:
cache-key: "windows"
- name: "Test"
shell: bash
run: "cargo nextest run --all --no-fail-fast"
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo nextest run --all --no-fail-fast
- name: "Package"
shell: bash
run: "bash ci/deploy.sh"

View File

@ -53,25 +53,21 @@ jobs:
- name: "Build wezterm (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p wezterm --release
- name: "Build wezterm-gui (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p wezterm-gui --release
- name: "Build wezterm-mux-server (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p wezterm-mux-server --release
- name: "Build strip-ansi-escapes (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p strip-ansi-escapes --release
- name: "Install cargo-nextest from Cargo"
@ -81,7 +77,9 @@ jobs:
cache-key: "windows"
- name: "Test"
shell: bash
run: "cargo nextest run --all --no-fail-fast"
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo nextest run --all --no-fail-fast
- name: "Package"
shell: bash
run: "bash ci/deploy.sh"

View File

@ -40,25 +40,21 @@ jobs:
- name: "Build wezterm (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p wezterm --release
- name: "Build wezterm-gui (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p wezterm-gui --release
- name: "Build wezterm-mux-server (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p wezterm-mux-server --release
- name: "Build strip-ansi-escapes (Release mode)"
shell: cmd
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo build -p strip-ansi-escapes --release
- name: "Install cargo-nextest from Cargo"
@ -68,7 +64,9 @@ jobs:
cache-key: "windows"
- name: "Test"
shell: bash
run: "cargo nextest run --all --no-fail-fast"
run: |
PATH C:\Strawberry\perl\bin;%PATH%
cargo nextest run --all --no-fail-fast
- name: "Package"
shell: bash
run: "bash ci/deploy.sh"

View File

@ -424,6 +424,11 @@ rustup default {toolchain}
)
]
def fixup_windows_path(self, cmd):
if "win" in self.name:
return "PATH C:\\Strawberry\\perl\\bin;%PATH%\n" + cmd
return cmd
def build_all_release(self):
bin_crates = [
"wezterm",
@ -438,9 +443,7 @@ rustup default {toolchain}
RunStep(
name=f"Build {bin} (Release mode)",
shell="cmd",
run=f"""
PATH C:\\Strawberry\\perl\\bin;%PATH%
cargo build -p {bin} --release""",
run=self.fixup_windows_path(f"cargo build -p {bin} --release"),
)
]
elif "macos" in self.name:
@ -479,7 +482,7 @@ cargo build -p {bin} --release""",
# Run tests
RunStep(
name="Test",
run=run,
run=self.fixup_windows_path(run),
),
]