fork/wezterm

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

Wez Furlongci: cache api was biffed3463d5d81

vtparse-0.7.0
3.3 KiB98 linesraw
1name: macos
2
3on:
4  pull_request:
5    branches:
6      - main
7    paths:
8      - "**/*.rs"
9      - "**/Cargo.lock"
10      - "**/Cargo.toml"
11      - ".cargo/config.toml"
12      - ".github/workflows/gen_macos.yml"
13      - "assets/fonts/**/*"
14      - "assets/icon/*"
15      - "assets/macos/**/*"
16      - "ci/deploy.sh"
17      - "ci/macos-entitlement.plist"
18      - "ci/tag-name.sh"
19      - "get-deps"
20
21jobs:
22  build:
23    runs-on: "macos-latest"
24    
25    env:
26      CARGO_INCREMENTAL: "0"
27      SCCACHE_GHA_ENABLED: "true"
28      RUSTC_WRAPPER: "sccache"
29      MACOSX_DEPLOYMENT_TARGET: "10.12"
30
31    steps:
32      - name: "checkout repo"
33        uses: actions/checkout@v4
34        with:
35          submodules: "recursive"
36      - name: "Install Rust (ARM)"
37        shell: bash
38        run: "rustup target add aarch64-apple-darwin"
39      - name: "Install Rust (Intel)"
40        shell: bash
41        run: "rustup target add x86_64-apple-darwin"
42      - name: "Compile with sccache"
43        uses: mozilla-actions/sccache-action@v0.0.9
44      - name: "Cache Rust Dependencies"
45        uses: actions/cache@v4
46        id: cache-cargo-vendor
47        with:
48          path: |
49            vendor
50            .cargo/config
51          key: "cargo-deps-${{ hashFiles('**/Cargo.lock') }}"
52      - name: "Vendor dependecies"
53        if: steps.cache-cargo-vendor.outputs.cache-hit != 'true'
54        shell: bash
55        run: "cargo vendor --locked --versioned-dirs >> .cargo/config"
56      - name: "Install System Deps"
57        shell: bash
58        run: "env CI=yes PATH=$PATH ./get-deps"
59      - name: "Build wezterm (Release mode Intel)"
60        shell: bash
61        run: "cargo build --target x86_64-apple-darwin -p wezterm --release"
62      - name: "Build wezterm (Release mode ARM)"
63        shell: bash
64        run: "cargo build --target aarch64-apple-darwin -p wezterm --release"
65      - name: "Build wezterm-gui (Release mode Intel)"
66        shell: bash
67        run: "cargo build --target x86_64-apple-darwin -p wezterm-gui --release"
68      - name: "Build wezterm-gui (Release mode ARM)"
69        shell: bash
70        run: "cargo build --target aarch64-apple-darwin -p wezterm-gui --release"
71      - name: "Build wezterm-mux-server (Release mode Intel)"
72        shell: bash
73        run: "cargo build --target x86_64-apple-darwin -p wezterm-mux-server --release"
74      - name: "Build wezterm-mux-server (Release mode ARM)"
75        shell: bash
76        run: "cargo build --target aarch64-apple-darwin -p wezterm-mux-server --release"
77      - name: "Build strip-ansi-escapes (Release mode Intel)"
78        shell: bash
79        run: "cargo build --target x86_64-apple-darwin -p strip-ansi-escapes --release"
80      - name: "Build strip-ansi-escapes (Release mode ARM)"
81        shell: bash
82        run: "cargo build --target aarch64-apple-darwin -p strip-ansi-escapes --release"
83      - name: "Install cargo-nextest from Cargo"
84        uses: baptiste0928/cargo-install@v3
85        with:
86          crate: "cargo-nextest"
87          cache-key: "macos"
88      - name: "Test"
89        shell: bash
90        run: "cargo nextest run --all --no-fail-fast --target=x86_64-apple-darwin"
91      - name: "Package"
92        shell: bash
93        run: "bash ci/deploy.sh"
94      - name: "Upload artifact"
95        uses: actions/upload-artifact@v4
96        with:
97          name: "macos"
98          path: "WezTerm-*.zip"