fork/wezterm

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

Wez Furlongci: cache api was biffed3463d5d81

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