From 46c759a08fbf5f78ca20beec5a91e04114c04b0f Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 2 May 2021 09:29:40 -0700 Subject: [PATCH] ci: add fedora 34 --- .github/workflows/gen_fedora34.yml | 85 +++++++++++++ .github/workflows/gen_fedora34_continuous.yml | 117 ++++++++++++++++++ .github/workflows/gen_fedora34_tag.yml | 72 +++++++++++ ci/generate-workflows.py | 1 + 4 files changed, 275 insertions(+) create mode 100644 .github/workflows/gen_fedora34.yml create mode 100644 .github/workflows/gen_fedora34_continuous.yml create mode 100644 .github/workflows/gen_fedora34_tag.yml diff --git a/.github/workflows/gen_fedora34.yml b/.github/workflows/gen_fedora34.yml new file mode 100644 index 000000000..a4f966bb8 --- /dev/null +++ b/.github/workflows/gen_fedora34.yml @@ -0,0 +1,85 @@ + +name: fedora34 + +on: + pull_request: + branches: + - main + paths-ignore: + - '.cirrus.yml' + - 'docs/*' + - 'ci/build-docs.sh' + - 'ci/generate-docs.py' + - 'ci/subst-release-info.py' + - '.github/workflows/pages.yml' + - '**/*.md' + + +jobs: + build: + strategy: + fail-fast: false + runs-on: "ubuntu-latest" + container: "fedora:34" + steps: + - 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" + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" + - name: "Cache cargo" + uses: actions/cache@v2.1.5 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + + key: "fedora34-None-2-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-cargo" + - name: "Install System Deps" + shell: bash + run: " env PATH=$PATH ./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: "fedora34" + path: "pkg_" diff --git a/.github/workflows/gen_fedora34_continuous.yml b/.github/workflows/gen_fedora34_continuous.yml new file mode 100644 index 000000000..4084233e2 --- /dev/null +++ b/.github/workflows/gen_fedora34_continuous.yml @@ -0,0 +1,117 @@ + +name: fedora34_continuous + +on: + schedule: + - cron: "10 3 * * *" + push: + branches: + - main + paths-ignore: + - '.cirrus.yml' + - 'docs/**' + - 'ci/build-docs.sh' + - 'ci/generate-docs.py' + - 'ci/subst-release-info.py' + - '.github/workflows/pages.yml' + - '**/*.md' + + +jobs: + build: + strategy: + fail-fast: false + runs-on: "ubuntu-latest" + container: "fedora:34" + steps: + - 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" + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" + - name: "Cache cargo" + uses: actions/cache@v2.1.5 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + + key: "fedora34-None-2-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-cargo" + - name: "Install System Deps" + shell: bash + run: | + export BUILD_REASON=Schedule + env PATH=$PATH ./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-fedora34.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 }}" diff --git a/.github/workflows/gen_fedora34_tag.yml b/.github/workflows/gen_fedora34_tag.yml new file mode 100644 index 000000000..d19d954fb --- /dev/null +++ b/.github/workflows/gen_fedora34_tag.yml @@ -0,0 +1,72 @@ + +name: fedora34_tag + +on: + push: + tags: + - "20*" + + +jobs: + build: + strategy: + fail-fast: false + runs-on: "ubuntu-latest" + container: "fedora:34" + steps: + - 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" + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: "true" + - name: "Cache cargo" + uses: actions/cache@v2.1.5 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + + key: "fedora34-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" + - 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" + prerelease: true + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/ci/generate-workflows.py b/ci/generate-workflows.py index 1c7add54d..a1155a6a2 100755 --- a/ci/generate-workflows.py +++ b/ci/generate-workflows.py @@ -536,6 +536,7 @@ TARGETS = [ Target(container="fedora:31"), Target(container="fedora:32"), Target(container="fedora:33"), + Target(container="fedora:34"), Target(container="centos:7", bootstrap_git=True), Target(container="centos:8"), Target(name="windows", os="vs2017-win2016", rust_target="x86_64-pc-windows-msvc"),