1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 14:22:37 +03:00

ci: use newer compiler on centos7

Needed to support the IME work in #1043
This commit is contained in:
Wez Furlong 2021-08-19 19:22:22 -07:00
parent 6404099d25
commit 2446ac5d7f
4 changed files with 49 additions and 20 deletions

View File

@ -32,8 +32,7 @@ jobs:
shell: bash
run: |
yum install -y wget curl-devel expat-devel gettext-devel openssl-devel zlib-devel centos-release-scl-rh perl-ExtUtils-MakeMaker make
yum install -y devtoolset-9-gcc devtoolset-9-gcc-c++
yum install -y wget curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker make devtoolset-9-gcc devtoolset-9-gcc-c++
if test ! -x /usr/local/git/bin/git ; then
cd /tmp

View File

@ -35,7 +35,7 @@ jobs:
run: |
export BUILD_REASON=Schedule
yum install -y wget curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker make
yum install -y wget curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker make devtoolset-9-gcc devtoolset-9-gcc-c++
if test ! -x /usr/local/git/bin/git ; then
cd /tmp
@ -103,14 +103,14 @@ jobs:
shell: bash
run: |
export BUILD_REASON=Schedule
cargo build --all --release
source /opt/rh/devtoolset-9/enable && cargo build --all --release
- name: "Test (Release mode)"
shell: bash
run: |
export BUILD_REASON=Schedule
cargo test --all --release
source /opt/rh/devtoolset-9/enable && cargo test --all --release
- name: "Package"

View File

@ -23,7 +23,7 @@ jobs:
shell: bash
run: |
yum install -y wget curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker make
yum install -y wget curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker make devtoolset-9-gcc devtoolset-9-gcc-c++
if test ! -x /usr/local/git/bin/git ; then
cd /tmp
@ -72,10 +72,10 @@ jobs:
run: " env PATH=$PATH ./get-deps"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"
run: "source /opt/rh/devtoolset-9/enable && cargo build --all --release"
- name: "Test (Release mode)"
shell: bash
run: "cargo test --all --release"
run: "source /opt/rh/devtoolset-9/enable && cargo test --all --release"
- name: "Package"
shell: bash
run: "bash ci/deploy.sh"

View File

@ -167,6 +167,8 @@ class Target(object):
pre_reqs = ""
if self.uses_yum():
pre_reqs = "yum install -y wget curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker make"
if self.name == "centos7":
pre_reqs += " devtoolset-9-gcc devtoolset-9-gcc-c++"
elif self.uses_apt():
pre_reqs = "apt-get install -y wget libcurl4-openssl-dev libexpat-dev gettext libssl-dev libz-dev gcc libextutils-autoinstall-perl make"
@ -216,7 +218,10 @@ ln -s /usr/local/git/bin/git /usr/local/bin/git
]
if "macos" in self.name:
steps += [
RunStep(name="Install Rust (ARM)", run="rustup target add aarch64-apple-darwin")
RunStep(
name="Install Rust (ARM)",
run="rustup target add aarch64-apple-darwin",
)
]
if cache:
cache_paths = ["~/.cargo/registry", "~/.cargo/git", "target"]
@ -233,7 +238,9 @@ ln -s /usr/local/git/bin/git /usr/local/bin/git
if "win" in self.name:
return []
sudo = "sudo -n " if self.needs_sudo() else ""
return [RunStep(name="Install System Deps", run=f"{sudo} env PATH=$PATH ./get-deps")]
return [
RunStep(name="Install System Deps", run=f"{sudo} env PATH=$PATH ./get-deps")
]
def check_formatting(self):
return [RunStep(name="Check formatting", run="cargo fmt --all -- --check")]
@ -253,17 +260,40 @@ cargo build --all --release""",
return [
RunStep(
name="Build (Release mode Intel)",
run="cargo build --target x86_64-apple-darwin --all --release"),
run="cargo build --target x86_64-apple-darwin --all --release",
),
RunStep(
name="Build (Release mode ARM)",
run="cargo build --target aarch64-apple-darwin --all --release"),
run="cargo build --target aarch64-apple-darwin --all --release",
),
]
return [RunStep(name="Build (Release mode)", run="cargo build --all --release")]
if self.name == "centos7":
enable = "source /opt/rh/devtoolset-9/enable && "
else:
enable = ""
return [
RunStep(
name="Build (Release mode)", run=enable + "cargo build --all --release"
)
]
def test_all_release(self):
if "macos" in self.name:
return [RunStep(name="Test (Release mode)", run="cargo test --target x86_64-apple-darwin --all --release")]
return [RunStep(name="Test (Release mode)", run="cargo test --all --release")]
return [
RunStep(
name="Test (Release mode)",
run="cargo test --target x86_64-apple-darwin --all --release",
)
]
if self.name == "centos7":
enable = "source /opt/rh/devtoolset-9/enable && "
else:
enable = ""
return [
RunStep(
name="Test (Release mode)", run=enable + "cargo test --all --release"
)
]
def package(self):
steps = [RunStep("Package", "bash ci/deploy.sh")]