fork/wezterm

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

Wez Furlongci: cache api was biffed3463d5d81

main
4.2 KiB139 linesraw
1name: fedora41_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_fedora41_continuous.yml"
15      - "assets/fonts/**/*"
16      - "assets/icon/*"
17      - "assets/open-wezterm-here"
18      - "assets/shell-completion/**/*"
19      - "assets/shell-integration/**/*"
20      - "assets/wezterm-nautilus.py"
21      - "assets/wezterm.appdata.xml"
22      - "assets/wezterm.desktop"
23      - "ci/deploy.sh"
24      - "ci/tag-name.sh"
25      - "get-deps"
26      - "termwiz/data/wezterm.terminfo"
27
28jobs:
29  build:
30    runs-on: "ubuntu-latest"
31    container: "fedora:41"
32    env:
33      BUILD_REASON: "Schedule"
34      CARGO_INCREMENTAL: "0"
35      SCCACHE_GHA_ENABLED: "true"
36      RUSTC_WRAPPER: "sccache"
37
38    steps:
39      - name: "Install config manager"
40        shell: bash
41        run: "dnf install -y 'dnf-command(config-manager)'"
42      - name: "Install git"
43        shell: bash
44        run: "yum install -y git"
45      - name: "Install curl"
46        shell: bash
47        run: "yum install -y curl"
48      - name: "Ensure /run/sshd exists"
49        shell: bash
50        run: "mkdir -p /run/sshd"
51      - name: "Install openssh-server"
52        shell: bash
53        run: "yum install -y openssh-server"
54      - name: "Workaround git permissions issue"
55        shell: bash
56        run: "git config --global --add safe.directory /__w/wezterm/wezterm"
57      - name: "checkout repo"
58        uses: actions/checkout@v4
59        with:
60          submodules: "recursive"
61      - name: "Install Rust"
62        uses: dtolnay/rust-toolchain@stable
63      - name: "Compile with sccache"
64        uses: mozilla-actions/sccache-action@v0.0.9
65      - name: "Cache Rust Dependencies"
66        uses: actions/cache@v4
67        id: cache-cargo-vendor
68        with:
69          path: |
70            vendor
71            .cargo/config
72          key: "cargo-deps-${{ hashFiles('**/Cargo.lock') }}"
73      - name: "Vendor dependecies"
74        if: steps.cache-cargo-vendor.outputs.cache-hit != 'true'
75        shell: bash
76        run: "cargo vendor --locked --versioned-dirs >> .cargo/config"
77      - name: "Install System Deps"
78        shell: bash
79        run: "env CI=yes PATH=$PATH ./get-deps"
80      - name: "Build wezterm (Release mode)"
81        shell: bash
82        run: "cargo build -p wezterm --release"
83      - name: "Build wezterm-gui (Release mode)"
84        shell: bash
85        run: "cargo build -p wezterm-gui --release"
86      - name: "Build wezterm-mux-server (Release mode)"
87        shell: bash
88        run: "cargo build -p wezterm-mux-server --release"
89      - name: "Build strip-ansi-escapes (Release mode)"
90        shell: bash
91        run: "cargo build -p strip-ansi-escapes --release"
92      - name: "Install cargo-nextest from Cargo"
93        uses: baptiste0928/cargo-install@v3
94        with:
95          crate: "cargo-nextest"
96          cache-key: "fedora41"
97      - name: "Test"
98        shell: bash
99        run: "cargo nextest run --all --no-fail-fast"
100      - name: "Package"
101        shell: bash
102        run: "bash ci/deploy.sh"
103      - name: "Move RPM"
104        shell: bash
105        run: "mv ~/rpmbuild/RPMS/*/*.rpm wezterm-nightly-fedora41.rpm"
106      - name: "Upload artifact"
107        uses: actions/upload-artifact@v4
108        with:
109          name: "fedora41"
110          path: "wezterm-*.rpm"
111          retention-days: 5
112
113  upload:
114    runs-on: ubuntu-latest
115    needs: build
116    if: github.repository == 'wezterm/wezterm'
117    permissions:
118      contents: write
119      pages: write
120      id-token: write
121
122    steps:
123      - name: "Workaround git permissions issue"
124        shell: bash
125        run: "git config --global --add safe.directory /__w/wezterm/wezterm"
126      - name: "checkout repo"
127        uses: actions/checkout@v4
128      - name: "Download artifact"
129        uses: actions/download-artifact@v4
130        with:
131          name: "fedora41"
132      - name: "Checksum"
133        shell: bash
134        run: "for f in wezterm-*.rpm ; do sha256sum $f > $f.sha256 ; done"
135      - name: "Upload to Nightly Release"
136        env:
137          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
138        shell: bash
139        run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm *.sha256"