fork/wezterm

git clone https://git.julia.blue/fork/wezterm

Wez Furlongci: cache api was biffed3463d5d81

vtparse-0.7.0
3.4 KiB120 linesraw
1name: windows_continuous
2
3on:
4  schedule:
5    - cron: "10 3 * * *"
6  push:
7    branches:
8      - main
9    paths:
10      - "**/*.rs"
11      - "**/Cargo.lock"
12      - "**/Cargo.toml"
13      - ".cargo/config.toml"
14      - ".github/workflows/gen_windows_continuous.yml"
15      - "assets/fonts/**/*"
16      - "assets/icon/*"
17      - "assets/windows/**/*"
18      - "ci/deploy.sh"
19      - "ci/windows-installer.iss"
20
21jobs:
22  build:
23    runs-on: "windows-latest"
24    
25    env:
26      BUILD_REASON: "Schedule"
27      CARGO_INCREMENTAL: "0"
28      SCCACHE_GHA_ENABLED: "true"
29      RUSTC_WRAPPER: "sccache"
30      RUSTUP_WINDOWS_PATH_ADD_BIN: "1"
31
32    steps:
33      - name: "checkout repo"
34        uses: actions/checkout@v4
35        with:
36          submodules: "recursive"
37      - name: "Install Rust"
38        uses: dtolnay/rust-toolchain@stable
39        with:
40          target: "x86_64-pc-windows-msvc"
41      - name: "Compile with sccache"
42        uses: mozilla-actions/sccache-action@v0.0.9
43      - name: "Cache Rust Dependencies"
44        uses: actions/cache@v4
45        id: cache-cargo-vendor
46        with:
47          path: |
48            vendor
49            .cargo/config
50          key: "cargo-deps-${{ hashFiles('**/Cargo.lock') }}"
51      - name: "Vendor dependecies"
52        if: steps.cache-cargo-vendor.outputs.cache-hit != 'true'
53        shell: bash
54        run: "cargo vendor --locked --versioned-dirs >> .cargo/config"
55      - name: "Build wezterm (Release mode)"
56        shell: cmd
57        run: |
58          PATH C:\Strawberry\perl\bin;%PATH%
59          cargo build -p wezterm --release
60      - name: "Build wezterm-gui (Release mode)"
61        shell: cmd
62        run: |
63          PATH C:\Strawberry\perl\bin;%PATH%
64          cargo build -p wezterm-gui --release
65      - name: "Build wezterm-mux-server (Release mode)"
66        shell: cmd
67        run: |
68          PATH C:\Strawberry\perl\bin;%PATH%
69          cargo build -p wezterm-mux-server --release
70      - name: "Build strip-ansi-escapes (Release mode)"
71        shell: cmd
72        run: |
73          PATH C:\Strawberry\perl\bin;%PATH%
74          cargo build -p strip-ansi-escapes --release
75      - name: "Install cargo-nextest from Cargo"
76        uses: baptiste0928/cargo-install@v3
77        with:
78          crate: "cargo-nextest"
79          cache-key: "windows"
80      - name: "Test"
81        shell: cmd
82        run: |
83          PATH C:\Strawberry\perl\bin;%PATH%
84          cargo nextest run --all --no-fail-fast
85      - name: "Package"
86        shell: bash
87        run: "bash ci/deploy.sh"
88      - name: "Upload artifact"
89        uses: actions/upload-artifact@v4
90        with:
91          name: "windows"
92          path: |
93            WezTerm-*.zip
94            WezTerm-*.exe
95          retention-days: 5
96
97  upload:
98    runs-on: ubuntu-latest
99    needs: build
100    if: github.repository == 'wezterm/wezterm'
101    permissions:
102      contents: write
103      pages: write
104      id-token: write
105
106    steps:
107      - name: "checkout repo"
108        uses: actions/checkout@v4
109      - name: "Download artifact"
110        uses: actions/download-artifact@v4
111        with:
112          name: "windows"
113      - name: "Checksum"
114        shell: bash
115        run: "for f in WezTerm-*.zip WezTerm-*.exe ; do sha256sum $f > $f.sha256 ; done"
116      - name: "Upload to Nightly Release"
117        env:
118          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119        shell: bash
120        run: "bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip WezTerm-*.exe *.sha256"