2022-05-11 07:23:56 +03:00
|
|
|
name: centos7
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-03-16 07:31:46 +03:00
|
|
|
paths:
|
|
|
|
- "**/*.rs"
|
|
|
|
- "**/Cargo.lock"
|
|
|
|
- "**/Cargo.toml"
|
2023-03-16 10:05:00 +03:00
|
|
|
- ".github/workflows/gen_centos7.yml"
|
2023-03-16 07:31:46 +03:00
|
|
|
- "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"
|
2023-03-24 16:49:37 +03:00
|
|
|
- "ci/tag-name.sh"
|
2023-03-16 07:31:46 +03:00
|
|
|
- "get-deps"
|
|
|
|
- "termwiz/data/wezterm.terminfo"
|
2022-05-11 07:23:56 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: "ubuntu-latest"
|
|
|
|
container: "quay.io/centos/centos:centos7"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: "Install SCL"
|
|
|
|
shell: bash
|
|
|
|
run: "yum install -y centos-release-scl-rh"
|
|
|
|
- name: "Update compiler"
|
|
|
|
shell: bash
|
|
|
|
run: "yum install -y devtoolset-9-gcc devtoolset-9-gcc-c++"
|
|
|
|
- name: "Cache Git installation"
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: "/usr/local/git"
|
|
|
|
key: "centos7-git-2.26.2"
|
|
|
|
- name: "Install Git from source"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
yum install -y wget curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker make
|
|
|
|
if test ! -x /usr/local/git/bin/git ; then
|
|
|
|
cd /tmp
|
|
|
|
wget https://github.com/git/git/archive/v2.26.2.tar.gz
|
|
|
|
tar xzf v2.26.2.tar.gz
|
|
|
|
cd git-2.26.2
|
|
|
|
make prefix=/usr/local/git install
|
|
|
|
fi
|
|
|
|
ln -s /usr/local/git/bin/git /usr/local/bin/git
|
|
|
|
- name: "Install curl"
|
|
|
|
shell: bash
|
|
|
|
run: "yum install -y curl"
|
|
|
|
- name: "Ensure /run/sshd exists"
|
|
|
|
shell: bash
|
|
|
|
run: "mkdir -p /run/sshd"
|
|
|
|
- name: "Install openssh-server"
|
|
|
|
shell: bash
|
|
|
|
run: "yum install -y openssh-server"
|
|
|
|
- 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"
|
2023-03-24 20:16:09 +03:00
|
|
|
- name: "Install Rustup"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
|
|
|
|
if ! command -v rustup &>/dev/null; then
|
|
|
|
curl --proto '=https' --tlsv1.2 --retry 10 -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
|
|
|
|
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
|
|
|
|
fi
|
|
|
|
- name: "Setup Toolchain"
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
|
|
|
|
rustup toolchain install stable --profile minimal --no-self-update
|
|
|
|
rustup default stable
|
2022-05-11 07:23:56 +03:00
|
|
|
- name: "Cache cargo"
|
2023-03-25 03:54:36 +03:00
|
|
|
uses: Swatinem/rust-cache@v2
|
2022-05-11 07:23:56 +03:00
|
|
|
with:
|
2023-03-25 03:54:36 +03:00
|
|
|
key: "centos7-None-2-${{ runner.os }}-cargo"
|
2022-05-11 07:23:56 +03:00
|
|
|
- name: "Install System Deps"
|
|
|
|
shell: bash
|
2023-03-22 06:01:57 +03:00
|
|
|
run: "env CI=yes PATH=$PATH ./get-deps"
|
2022-05-11 07:23:56 +03:00
|
|
|
- name: "Build (Release mode)"
|
|
|
|
shell: bash
|
|
|
|
run: "source /opt/rh/devtoolset-9/enable && cargo build --all --release"
|
2023-03-25 07:11:22 +03:00
|
|
|
- name: "Install cargo-nextest from Cargo"
|
|
|
|
uses: baptiste0928/cargo-install@v2
|
|
|
|
with:
|
|
|
|
crate: "cargo-nextest"
|
|
|
|
cache-key: "centos7"
|
2023-07-13 18:14:02 +03:00
|
|
|
- name: "Test (Release mode)"
|
2022-05-11 07:23:56 +03:00
|
|
|
shell: bash
|
2023-03-25 07:11:22 +03:00
|
|
|
run: |
|
|
|
|
source /opt/rh/devtoolset-9/enable
|
2023-07-13 18:14:02 +03:00
|
|
|
cargo nextest run --all --release --no-fail-fast
|
2022-05-11 07:23:56 +03:00
|
|
|
- name: "Package"
|
|
|
|
shell: bash
|
|
|
|
run: "bash ci/deploy.sh"
|
|
|
|
- name: "Move RPM"
|
|
|
|
shell: bash
|
|
|
|
run: "mv ~/rpmbuild/RPMS/*/*.rpm ."
|
|
|
|
- name: "Upload artifact"
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: "centos7"
|
|
|
|
path: "wezterm-*.rpm"
|