fork/wezterm

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

Wez Furlongci: bump sccache action836a0855f

termwiz-0.23.0
4.3 KiB131 linesraw
1name: macos_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      - ".github/workflows/gen_macos_continuous.yml"
14      - "assets/fonts/**/*"
15      - "assets/icon/*"
16      - "assets/macos/**/*"
17      - "ci/deploy.sh"
18      - "ci/macos-entitlement.plist"
19      - "ci/tag-name.sh"
20      - "get-deps"
21
22jobs:
23  build:
24    runs-on: "macos-latest"
25    
26    env:
27      BUILD_REASON: "Schedule"
28      CARGO_INCREMENTAL: "0"
29      SCCACHE_GHA_ENABLED: "true"
30      RUSTC_WRAPPER: "sccache"
31      MACOSX_DEPLOYMENT_TARGET: "10.12"
32
33    steps:
34      - name: "checkout repo"
35        uses: actions/checkout@v4
36        with:
37          submodules: "recursive"
38      - name: "Install Rust (ARM)"
39        shell: bash
40        run: "rustup target add aarch64-apple-darwin"
41      - name: "Install Rust (Intel)"
42        shell: bash
43        run: "rustup target add x86_64-apple-darwin"
44      - name: "Compile with sccache"
45        uses: mozilla-actions/sccache-action@v0.0.7
46      - name: "Cache Rust Dependencies"
47        uses: actions/cache@v4
48        id: cache-cargo-vendor
49        with:
50          path: |
51            vendor
52            .cargo/config
53          key: "cargo-deps-${{ hashFiles('**/Cargo.lock') }}"
54      - name: "Vendor dependecies"
55        if: steps.cache-cargo-vendor.outputs.cache-hit != 'true'
56        shell: bash
57        run: "cargo vendor --locked --versioned-dirs >> .cargo/config"
58      - name: "Install System Deps"
59        shell: bash
60        run: "env CI=yes PATH=$PATH ./get-deps"
61      - name: "Build wezterm (Release mode Intel)"
62        shell: bash
63        run: "cargo build --target x86_64-apple-darwin -p wezterm --release"
64      - name: "Build wezterm (Release mode ARM)"
65        shell: bash
66        run: "cargo build --target aarch64-apple-darwin -p wezterm --release"
67      - name: "Build wezterm-gui (Release mode Intel)"
68        shell: bash
69        run: "cargo build --target x86_64-apple-darwin -p wezterm-gui --release"
70      - name: "Build wezterm-gui (Release mode ARM)"
71        shell: bash
72        run: "cargo build --target aarch64-apple-darwin -p wezterm-gui --release"
73      - name: "Build wezterm-mux-server (Release mode Intel)"
74        shell: bash
75        run: "cargo build --target x86_64-apple-darwin -p wezterm-mux-server --release"
76      - name: "Build wezterm-mux-server (Release mode ARM)"
77        shell: bash
78        run: "cargo build --target aarch64-apple-darwin -p wezterm-mux-server --release"
79      - name: "Build strip-ansi-escapes (Release mode Intel)"
80        shell: bash
81        run: "cargo build --target x86_64-apple-darwin -p strip-ansi-escapes --release"
82      - name: "Build strip-ansi-escapes (Release mode ARM)"
83        shell: bash
84        run: "cargo build --target aarch64-apple-darwin -p strip-ansi-escapes --release"
85      - name: "Install cargo-nextest from Cargo"
86        uses: baptiste0928/cargo-install@v3
87        with:
88          crate: "cargo-nextest"
89          cache-key: "macos"
90      - name: "Test"
91        shell: bash
92        run: "cargo nextest run --all --no-fail-fast --target=x86_64-apple-darwin"
93      - name: "Package"
94        env:
95          MACOS_APPLEID: ${{ secrets.MACOS_APPLEID }}
96          MACOS_APP_PW: ${{ secrets.MACOS_APP_PW }}
97          MACOS_CERT: ${{ secrets.MACOS_CERT }}
98          MACOS_CERT_PW: ${{ secrets.MACOS_CERT_PW }}
99          MACOS_TEAM_ID: ${{ secrets.MACOS_TEAM_ID }}
100        shell: bash
101        run: "bash ci/deploy.sh"
102      - name: "Upload artifact"
103        uses: actions/upload-artifact@v4
104        with:
105          name: "macos"
106          path: "WezTerm-*.zip"
107          retention-days: 5
108
109  upload:
110    runs-on: ubuntu-latest
111    needs: build
112    permissions:
113      contents: write
114      pages: write
115      id-token: write
116
117    steps:
118      - name: "checkout repo"
119        uses: actions/checkout@v4
120      - name: "Download artifact"
121        uses: actions/download-artifact@v4
122        with:
123          name: "macos"
124      - name: "Checksum"
125        shell: bash
126        run: "for f in WezTerm-*.zip ; do sha256sum $f > $f.sha256 ; done"
127      - name: "Upload to Nightly Release"
128        env:
129          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
130        shell: bash
131        run: "bash ci/retry.sh gh release upload --clobber nightly WezTerm-*.zip *.sha256"