fork/wezterm

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

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

termwiz-0.23.1
4.3 KiB142 linesraw
1name: centos9_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_centos9_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: "quay.io/centos/centos:stream9"
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: "Enable CRB repo for X bits"
43        shell: bash
44        run: "dnf config-manager --set-enabled crb"
45      - name: "Install git"
46        shell: bash
47        run: "yum install -y git"
48      - name: "Install curl-minimal"
49        shell: bash
50        run: "yum install -y curl-minimal"
51      - name: "Ensure /run/sshd exists"
52        shell: bash
53        run: "mkdir -p /run/sshd"
54      - name: "Install openssh-server"
55        shell: bash
56        run: "yum install -y openssh-server"
57      - name: "Workaround git permissions issue"
58        shell: bash
59        run: "git config --global --add safe.directory /__w/wezterm/wezterm"
60      - name: "checkout repo"
61        uses: actions/checkout@v4
62        with:
63          submodules: "recursive"
64      - name: "Install Rust"
65        uses: dtolnay/rust-toolchain@stable
66      - name: "Compile with sccache"
67        uses: mozilla-actions/sccache-action@v0.0.7
68      - name: "Cache Rust Dependencies"
69        uses: actions/cache@v4
70        id: cache-cargo-vendor
71        with:
72          path: |
73            vendor
74            .cargo/config
75          key: "cargo-deps-${{ hashFiles('**/Cargo.lock') }}"
76      - name: "Vendor dependecies"
77        if: steps.cache-cargo-vendor.outputs.cache-hit != 'true'
78        shell: bash
79        run: "cargo vendor --locked --versioned-dirs >> .cargo/config"
80      - name: "Install System Deps"
81        shell: bash
82        run: "env CI=yes PATH=$PATH ./get-deps"
83      - name: "Build wezterm (Release mode)"
84        shell: bash
85        run: "cargo build -p wezterm --release"
86      - name: "Build wezterm-gui (Release mode)"
87        shell: bash
88        run: "cargo build -p wezterm-gui --release"
89      - name: "Build wezterm-mux-server (Release mode)"
90        shell: bash
91        run: "cargo build -p wezterm-mux-server --release"
92      - name: "Build strip-ansi-escapes (Release mode)"
93        shell: bash
94        run: "cargo build -p strip-ansi-escapes --release"
95      - name: "Install cargo-nextest from Cargo"
96        uses: baptiste0928/cargo-install@v3
97        with:
98          crate: "cargo-nextest"
99          cache-key: "centos9"
100      - name: "Test"
101        shell: bash
102        run: "cargo nextest run --all --no-fail-fast"
103      - name: "Package"
104        shell: bash
105        run: "bash ci/deploy.sh"
106      - name: "Move RPM"
107        shell: bash
108        run: "mv ~/rpmbuild/RPMS/*/*.rpm wezterm-nightly-centos9.rpm"
109      - name: "Upload artifact"
110        uses: actions/upload-artifact@v4
111        with:
112          name: "centos9"
113          path: "wezterm-*.rpm"
114          retention-days: 5
115
116  upload:
117    runs-on: ubuntu-latest
118    needs: build
119    if: github.repository == 'wezterm/wezterm'
120    permissions:
121      contents: write
122      pages: write
123      id-token: write
124
125    steps:
126      - name: "Workaround git permissions issue"
127        shell: bash
128        run: "git config --global --add safe.directory /__w/wezterm/wezterm"
129      - name: "checkout repo"
130        uses: actions/checkout@v4
131      - name: "Download artifact"
132        uses: actions/download-artifact@v4
133        with:
134          name: "centos9"
135      - name: "Checksum"
136        shell: bash
137        run: "for f in wezterm-*.rpm ; do sha256sum $f > $f.sha256 ; done"
138      - name: "Upload to Nightly Release"
139        env:
140          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141        shell: bash
142        run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm *.sha256"