2022-02-15 18:58:57 +03:00
|
|
|
name: alpine3.14
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-03-16 07:31:46 +03:00
|
|
|
paths:
|
|
|
|
- "**/*.rs"
|
|
|
|
- "**/Cargo.lock"
|
|
|
|
- "**/Cargo.toml"
|
|
|
|
- "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/appimage.sh"
|
|
|
|
- "ci/appstreamcli"
|
|
|
|
- "ci/deploy.sh"
|
|
|
|
- "ci/source-archive.sh"
|
|
|
|
- "get-deps"
|
|
|
|
- "tag-name.sh"
|
|
|
|
- "termwiz/data/wezterm.terminfo"
|
2022-02-15 18:58:57 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: "ubuntu-latest"
|
|
|
|
container: "alpine:3.14"
|
|
|
|
env:
|
|
|
|
RUSTFLAGS: "-C target-feature=-crt-static"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Upgrade system"
|
|
|
|
shell: sh
|
|
|
|
run: "apk upgrade --update-cache"
|
|
|
|
- name: "Install CI dependencies"
|
|
|
|
shell: sh
|
2022-04-19 16:19:59 +03:00
|
|
|
run: "apk add nodejs zstd wget bash coreutils tar findutils"
|
2022-02-15 18:58:57 +03:00
|
|
|
- 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: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: "minimal"
|
|
|
|
toolchain: "stable"
|
|
|
|
override: true
|
|
|
|
components: "rustfmt"
|
|
|
|
env:
|
|
|
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
|
|
|
|
- name: "Cache cargo"
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
target
|
|
|
|
key: "alpine3.14-None-2-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-cargo"
|
|
|
|
- name: "Install System Deps"
|
|
|
|
shell: bash
|
|
|
|
run: "env PATH=$PATH ./get-deps"
|
|
|
|
- name: "Build (Release mode)"
|
|
|
|
shell: bash
|
|
|
|
run: "cargo build --all --release"
|
|
|
|
- name: "Test (Release mode)"
|
|
|
|
shell: bash
|
|
|
|
run: "cargo test --all --release"
|
|
|
|
- name: "Package"
|
|
|
|
shell: bash
|
|
|
|
run: "bash ci/deploy.sh"
|
2022-04-20 07:18:36 +03:00
|
|
|
- name: "Rename APKs"
|
|
|
|
shell: bash
|
2022-04-25 17:10:18 +03:00
|
|
|
run: "mv ~/packages/wezterm/x86_64/*.apk $(echo ~/packages/wezterm/x86_64/*.apk | sed -e 's/wezterm-/wezterm-alpine3.14-/')"
|
2022-04-19 08:18:22 +03:00
|
|
|
- name: "Move APKs"
|
|
|
|
shell: bash
|
2022-04-20 07:18:36 +03:00
|
|
|
run: "mv ~/packages/wezterm/x86_64/*.apk ."
|
2022-04-19 08:18:22 +03:00
|
|
|
- name: "Move APK keys"
|
|
|
|
shell: bash
|
2022-04-20 07:18:36 +03:00
|
|
|
run: "mv ~/.abuild/*.pub wezterm-alpine3.14.pub"
|
2022-02-15 18:58:57 +03:00
|
|
|
- name: "Upload artifact"
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: "alpine3.14"
|
2022-04-19 08:18:22 +03:00
|
|
|
path: "wezterm-*.apk"
|