fork/wezterm

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

Wez Furlongci: trigger builds when .cargo/config.toml changes7d0bff069

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