CI: add centos 8 builds
This commit is contained in:
1 parent
e74f467c39
commit
21f3591aed
7 files changed
+316
-2
No files matched your search
@@ -0,0 +1,90 @@
|
||||
|
||||
name: centos8
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: "ubuntu-latest"
|
||||
container: "centos:8"
|
||||
steps:
|
||||
- name: "Install config manager"
|
||||
shell: bash
|
||||
run: "dnf install -y 'dnf-command(config-manager)'"
|
||||
- name: "Enable PowerTools"
|
||||
shell: bash
|
||||
run: "dnf config-manager --set-enabled PowerTools"
|
||||
- name: "Install git"
|
||||
shell: bash
|
||||
run: "yum install -y git"
|
||||
- name: "Install curl"
|
||||
shell: bash
|
||||
run: "yum install -y curl"
|
||||
- name: "checkout repo"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Fetch tags"
|
||||
shell: bash
|
||||
run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*"
|
||||
- name: "Fetch tag/branch history"
|
||||
shell: bash
|
||||
run: "git fetch --prune --unshallow"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
- name: "Cache cargo registry"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "~/.cargo/registry"
|
||||
key: "centos8-None-${{ hashFiles('Cargo.lock') }}-cargo-registry"
|
||||
- name: "Cache cargo index"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "~/.cargo/git"
|
||||
key: "centos8-None-${{ hashFiles('Cargo.lock') }}-cargo-index"
|
||||
- name: "Cache cargo build"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "target"
|
||||
key: "centos8-None-${{ hashFiles('Cargo.lock') }}-cargo-build-target"
|
||||
- name: "Install System Deps"
|
||||
shell: bash
|
||||
run: "./get-deps"
|
||||
- name: "Check formatting"
|
||||
shell: bash
|
||||
run: "cargo fmt --all -- --check"
|
||||
- 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"
|
||||
- name: "Move Package for artifact upload"
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir pkg_
|
||||
mv ~/rpmbuild/RPMS/*/*.rpm pkg_
|
||||
|
||||
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: "centos8"
|
||||
path: "pkg_"
|
||||
@@ -0,0 +1,124 @@
|
||||
|
||||
name: centos8_continuous
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "10 * * * *"
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: "ubuntu-latest"
|
||||
container: "centos:8"
|
||||
steps:
|
||||
- name: "Install config manager"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
dnf install -y 'dnf-command(config-manager)'
|
||||
|
||||
|
||||
- name: "Enable PowerTools"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
dnf config-manager --set-enabled PowerTools
|
||||
|
||||
|
||||
- name: "Install git"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
yum install -y git
|
||||
|
||||
|
||||
- name: "Install curl"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
yum install -y curl
|
||||
|
||||
|
||||
- name: "checkout repo"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Fetch tags"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
|
||||
|
||||
|
||||
- name: "Fetch tag/branch history"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
git fetch --prune --unshallow
|
||||
|
||||
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
- name: "Cache cargo registry"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "~/.cargo/registry"
|
||||
key: "centos8-None-${{ hashFiles('Cargo.lock') }}-cargo-registry"
|
||||
- name: "Cache cargo index"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "~/.cargo/git"
|
||||
key: "centos8-None-${{ hashFiles('Cargo.lock') }}-cargo-index"
|
||||
- name: "Cache cargo build"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "target"
|
||||
key: "centos8-None-${{ hashFiles('Cargo.lock') }}-cargo-build-target"
|
||||
- name: "Install System Deps"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
./get-deps
|
||||
|
||||
|
||||
- name: "Build (Release mode)"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
cargo build --all --release
|
||||
|
||||
|
||||
- name: "Test (Release mode)"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
cargo test --all --release
|
||||
|
||||
|
||||
- name: "Package"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
bash ci/deploy.sh
|
||||
|
||||
|
||||
- name: "Move RPM"
|
||||
shell: bash
|
||||
run: |
|
||||
export BUILD_REASON=Schedule
|
||||
mv ~/rpmbuild/RPMS/*/*.rpm wezterm-nightly-centos8.rpm
|
||||
|
||||
|
||||
- name: "Upload to Nightly Release"
|
||||
uses: wez/upload-release-assets@releases/v1
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
release-tag: "nightly"
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
@@ -0,0 +1,81 @@
|
||||
|
||||
name: centos8_tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "20*"
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
runs-on: "ubuntu-latest"
|
||||
container: "centos:8"
|
||||
steps:
|
||||
- name: "Install config manager"
|
||||
shell: bash
|
||||
run: "dnf install -y 'dnf-command(config-manager)'"
|
||||
- name: "Enable PowerTools"
|
||||
shell: bash
|
||||
run: "dnf config-manager --set-enabled PowerTools"
|
||||
- name: "Install git"
|
||||
shell: bash
|
||||
run: "yum install -y git"
|
||||
- name: "Install curl"
|
||||
shell: bash
|
||||
run: "yum install -y curl"
|
||||
- name: "checkout repo"
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: "recursive"
|
||||
- name: "Fetch tags"
|
||||
shell: bash
|
||||
run: "git fetch --depth=1 origin +refs/tags/*:refs/tags/*"
|
||||
- name: "Fetch tag/branch history"
|
||||
shell: bash
|
||||
run: "git fetch --prune --unshallow"
|
||||
- name: "Install Rust"
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: "minimal"
|
||||
toolchain: "stable"
|
||||
override: true
|
||||
components: "rustfmt"
|
||||
- name: "Cache cargo registry"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "~/.cargo/registry"
|
||||
key: "centos8-None-${{ hashFiles('Cargo.lock') }}-cargo-registry"
|
||||
- name: "Cache cargo index"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "~/.cargo/git"
|
||||
key: "centos8-None-${{ hashFiles('Cargo.lock') }}-cargo-index"
|
||||
- name: "Cache cargo build"
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: "target"
|
||||
key: "centos8-None-${{ hashFiles('Cargo.lock') }}-cargo-build-target"
|
||||
- name: "Install System Deps"
|
||||
shell: bash
|
||||
run: "./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"
|
||||
- name: "Move RPM"
|
||||
shell: bash
|
||||
run: "mv ~/rpmbuild/RPMS/*/*.rpm ."
|
||||
- name: "Upload to Tagged Release"
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: "wezterm-*.rpm"
|
||||
env:
|
||||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
@@ -347,6 +347,17 @@ cargo build --all --release""",
|
||||
),
|
||||
RunStep("Update APT", "apt update"),
|
||||
]
|
||||
if self.container == "centos:8":
|
||||
steps += [
|
||||
RunStep(
|
||||
"Install config manager",
|
||||
"dnf install -y 'dnf-command(config-manager)'"
|
||||
),
|
||||
RunStep(
|
||||
"Enable PowerTools",
|
||||
"dnf config-manager --set-enabled PowerTools"
|
||||
)
|
||||
]
|
||||
steps += self.install_git()
|
||||
steps += self.install_curl()
|
||||
steps += [
|
||||
@@ -419,6 +430,7 @@ TARGETS = [
|
||||
Target(container="fedora:31"),
|
||||
Target(container="fedora:32"),
|
||||
Target(container="centos:7", bootstrap_git=True),
|
||||
Target(container="centos:8"),
|
||||
Target(name="windows", os="vs2017-win2016", rust_target="x86_64-pc-windows-msvc"),
|
||||
]
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import re
|
||||
CATEGORIZE = {
|
||||
r".el7.x86_64.rpm$": "centos7_rpm",
|
||||
r".centos7.rpm$": "centos7_rpm",
|
||||
r".el8.x86_64.rpm$": "centos8_rpm",
|
||||
r".centos8.rpm$": "centos8_rpm",
|
||||
r".fc31.x86_64.rpm$": "fedora31_rpm",
|
||||
r".fedora31.rpm$": "fedora31_rpm",
|
||||
r".fc32.x86_64.rpm$": "fedora32_rpm",
|
||||
|
||||
@@ -61,6 +61,7 @@ on most Linux systems.
|
||||
|Distro | Stable | Nightly |
|
||||
|------------|------------------|---------------------|
|
||||
|CentOS7 |[{{ centos7_rpm_stable_asset }}]({{ centos7_rpm_stable }}) |[{{ centos7_rpm_nightly_asset }}]({{ centos7_rpm_nightly }})|
|
||||
|CentOS8 |[{{ centos8_rpm_stable_asset }}]({{ centos8_rpm_stable }}) |[{{ centos8_rpm_nightly_asset }}]({{ centos8_rpm_nightly }})|
|
||||
|Fedora31 |[{{ fedora31_rpm_stable_asset }}]({{ fedora31_rpm_stable }}) |[{{ fedora31_rpm_nightly_asset }}]({{ fedora31_rpm_nightly }})|
|
||||
|Fedora32 |[{{ fedora32_rpm_stable_asset }}]({{ fedora32_rpm_stable }}) |[{{ fedora32_rpm_nightly_asset }}]({{ fedora32_rpm_nightly }})|
|
||||
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
|
||||
# Centos may not have lsb_release installed
|
||||
if test -e /etc/centos-release || test -e /etc/fedora-release; then
|
||||
yum install -y \
|
||||
if test -x /bin/dnf ; then
|
||||
YUM=dnf
|
||||
else
|
||||
YUM=yum
|
||||
fi
|
||||
$YUM install -y \
|
||||
make \
|
||||
gcc \
|
||||
g++ \
|
||||
gcc-c++ \
|
||||
dbus-devel \
|
||||
fontconfig-devel \
|
||||
|
||||
Reference in new issue
Block a user