fork/wezterm

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

Wez Furlongci: bump sccache action836a0855f

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