fork/wezterm

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

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

termwiz-0.23.1
4.4 KiB144 linesraw
1name: debian10.3_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_debian10.3_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: "debian:10.3"
32    env:
33      BUILD_REASON: "Schedule"
34      CARGO_INCREMENTAL: "0"
35      SCCACHE_GHA_ENABLED: "true"
36      RUSTC_WRAPPER: "sccache"
37
38    steps:
39      - name: "set APT to non-interactive"
40        shell: bash
41        run: "echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections"
42      - name: "Update APT"
43        shell: bash
44        run: "apt update"
45      - name: "Install git"
46        shell: bash
47        run: "apt-get install -y git"
48      - name: "Install curl"
49        shell: bash
50        run: "apt-get install -y curl"
51      - name: "Update APT"
52        shell: bash
53        run: "apt update"
54      - name: "Ensure /run/sshd exists"
55        shell: bash
56        run: "mkdir -p /run/sshd"
57      - name: "Install openssh-server"
58        shell: bash
59        run: "apt-get install -y openssh-server"
60      - name: "Workaround git permissions issue"
61        shell: bash
62        run: "git config --global --add safe.directory /__w/wezterm/wezterm"
63      - name: "checkout repo"
64        uses: actions/checkout@v4
65        with:
66          submodules: "recursive"
67      - name: "Install Rust"
68        uses: dtolnay/rust-toolchain@stable
69      - name: "Compile with sccache"
70        uses: mozilla-actions/sccache-action@v0.0.7
71      - name: "Cache Rust Dependencies"
72        uses: actions/cache@v4
73        id: cache-cargo-vendor
74        with:
75          path: |
76            vendor
77            .cargo/config
78          key: "cargo-deps-${{ hashFiles('**/Cargo.lock') }}"
79      - name: "Vendor dependecies"
80        if: steps.cache-cargo-vendor.outputs.cache-hit != 'true'
81        shell: bash
82        run: "cargo vendor --locked --versioned-dirs >> .cargo/config"
83      - name: "Install System Deps"
84        shell: bash
85        run: "env CI=yes PATH=$PATH ./get-deps"
86      - name: "Build wezterm (Release mode)"
87        shell: bash
88        run: "cargo build -p wezterm --release"
89      - name: "Build wezterm-gui (Release mode)"
90        shell: bash
91        run: "cargo build -p wezterm-gui --release"
92      - name: "Build wezterm-mux-server (Release mode)"
93        shell: bash
94        run: "cargo build -p wezterm-mux-server --release"
95      - name: "Build strip-ansi-escapes (Release mode)"
96        shell: bash
97        run: "cargo build -p strip-ansi-escapes --release"
98      - name: "Install cargo-nextest from Cargo"
99        uses: baptiste0928/cargo-install@v3
100        with:
101          crate: "cargo-nextest"
102          cache-key: "debian10.3"
103      - name: "Test"
104        shell: bash
105        run: "cargo nextest run --all --no-fail-fast"
106      - name: "Package"
107        shell: bash
108        run: "bash ci/deploy.sh"
109      - name: "Upload artifact"
110        uses: actions/upload-artifact@v4
111        with:
112          name: "debian10.3"
113          path: |
114            wezterm-*.deb
115            wezterm-*.xz
116          retention-days: 5
117
118  upload:
119    runs-on: ubuntu-latest
120    needs: build
121    if: github.repository == 'wezterm/wezterm'
122    permissions:
123      contents: write
124      pages: write
125      id-token: write
126
127    steps:
128      - name: "Workaround git permissions issue"
129        shell: bash
130        run: "git config --global --add safe.directory /__w/wezterm/wezterm"
131      - name: "checkout repo"
132        uses: actions/checkout@v4
133      - name: "Download artifact"
134        uses: actions/download-artifact@v4
135        with:
136          name: "debian10.3"
137      - name: "Checksum"
138        shell: bash
139        run: "for f in wezterm-*.deb wezterm-*.xz ; do sha256sum $f > $f.sha256 ; done"
140      - name: "Upload to Nightly Release"
141        env:
142          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
143        shell: bash
144        run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.deb wezterm-*.xz *.sha256"