1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 02:25:28 +03:00
wezterm/.github/workflows/gen_alpine3.15_continuous.yml
Jalil Salamé 64b8749eb3
ci: Use nextest (#3342)
* ci: Use cargo-nextest to improve testing times

* chore: Regenerate workflows

* chore: Use nextest in non generated workflows

* fix(nextest): No fail fast

* fix: Caching of nextest ignores conatiner

* chore: Regenerate workflows

* fix(ci): Wrong input to cargo-install action

* fix: Merge conflicts

* fix(flaky-tests): Try updating OpenSUSE Leap to 15.4
2023-03-24 21:11:22 -07:00

116 lines
3.4 KiB
YAML

name: alpine3.15_continuous
on:
schedule:
- cron: "10 3 * * *"
push:
branches:
- main
paths:
- "**/*.rs"
- "**/Cargo.lock"
- "**/Cargo.toml"
- ".github/workflows/gen_alpine3.15_continuous.yml"
- "assets/fonts/**/*"
- "assets/icon/*"
- "assets/open-wezterm-here"
- "assets/shell-completion/**/*"
- "assets/shell-integration/**/*"
- "assets/wezterm-nautilus.py"
- "assets/wezterm.appdata.xml"
- "assets/wezterm.desktop"
- "ci/deploy.sh"
- "ci/tag-name.sh"
- "get-deps"
- "termwiz/data/wezterm.terminfo"
jobs:
build:
runs-on: "ubuntu-latest"
container: "alpine:3.15"
env:
BUILD_REASON: "Schedule"
RUSTFLAGS: "-C target-feature=-crt-static"
steps:
- name: "Upgrade system"
shell: sh
run: "apk upgrade --update-cache"
- name: "Install CI dependencies"
shell: sh
run: "apk add nodejs zstd wget bash coreutils tar findutils"
- name: "Allow root login"
shell: bash
run: "sed 's/root:!/root:*/g' -i /etc/shadow"
- name: "Install git"
shell: bash
run: "apk add git"
- name: "Install curl"
shell: bash
run: "apk add curl"
- name: "Install openssh"
shell: bash
run: "apk add openssh"
- name: "Workaround git permissions issue"
shell: bash
run: "git config --global --add safe.directory /__w/wezterm/wezterm"
- name: "checkout repo"
uses: actions/checkout@v3
with:
submodules: "recursive"
- name: "Install Rust"
uses: dtolnay/rust-toolchain@stable
- name: "Cache cargo"
uses: Swatinem/rust-cache@v2
with:
key: "alpine3.15-None-2-${{ runner.os }}-cargo"
- name: "Install System Deps"
shell: bash
run: "env CI=yes PATH=$PATH ./get-deps"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"
- name: "Install cargo-nextest from Cargo"
uses: baptiste0928/cargo-install@v2
with:
crate: "cargo-nextest"
cache-key: "alpine3.15"
- name: "Test (Release mode)"
shell: bash
run: "cargo nextest run --all --release --no-fail-fast"
- name: "Package"
shell: bash
run: "bash ci/deploy.sh"
- name: "Move APKs"
shell: bash
run: "mv ~/packages/wezterm/x86_64/*.apk wezterm-nightly-alpine3.15.apk"
- name: "Upload artifact"
uses: actions/upload-artifact@v3
with:
name: "alpine3.15"
path: "wezterm-*.apk"
retention-days: 5
upload:
runs-on: ubuntu-latest
needs: build
steps:
- name: "Workaround git permissions issue"
shell: bash
run: "git config --global --add safe.directory /__w/wezterm/wezterm"
- name: "checkout repo"
uses: actions/checkout@v3
- name: "Download artifact"
uses: actions/download-artifact@v3
with:
name: "alpine3.15"
- name: "Checksum"
shell: bash
run: "for f in wezterm-*.apk ; do sha256sum $f > $f.sha256 ; done"
- name: "Upload to Nightly Release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.apk *.sha256"