From 9f6d2db154d73bc6b77f7466887ebc2e6a2ad26a Mon Sep 17 00:00:00 2001 From: xpufx Date: Mon, 25 Apr 2022 23:27:56 +0300 Subject: [PATCH] Add opensuse packages to build/release workflows (#1916) * added opensuse packaging * change deploy.sh rpm spec for opensuse * added missing opensuse openssh install logic * push generated workflows * fix typo in func name - yum vs zypper * Update ci/generate-workflows.py merge run steps Co-authored-by: Sandro * fix libxcb-* packages for opensuse Co-authored-by: Sandro --- .github/workflows/gen_opensuse_leap.yml | 89 ++++++++++++++ .../gen_opensuse_leap_continuous.yml | 114 ++++++++++++++++++ .github/workflows/gen_opensuse_leap_tag.yml | 105 ++++++++++++++++ .github/workflows/gen_opensuse_tumbleweed.yml | 89 ++++++++++++++ .../gen_opensuse_tumbleweed_continuous.yml | 114 ++++++++++++++++++ .../workflows/gen_opensuse_tumbleweed_tag.yml | 105 ++++++++++++++++ ci/deploy.sh | 8 +- ci/generate-workflows.py | 43 ++++++- get-deps | 2 +- 9 files changed, 663 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/gen_opensuse_leap.yml create mode 100644 .github/workflows/gen_opensuse_leap_continuous.yml create mode 100644 .github/workflows/gen_opensuse_leap_tag.yml create mode 100644 .github/workflows/gen_opensuse_tumbleweed.yml create mode 100644 .github/workflows/gen_opensuse_tumbleweed_continuous.yml create mode 100644 .github/workflows/gen_opensuse_tumbleweed_tag.yml diff --git a/.github/workflows/gen_opensuse_leap.yml b/.github/workflows/gen_opensuse_leap.yml new file mode 100644 index 000000000..3e18be8d4 --- /dev/null +++ b/.github/workflows/gen_opensuse_leap.yml @@ -0,0 +1,89 @@ +name: opensuse_leap + +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" + - ".github/workflows/verify-pages.yml" + - ".github/workflows/no-response.yml" + - ".github/ISSUE_TEMPLATE/*" + - "**/*.md" + +jobs: + build: + runs-on: "ubuntu-latest" + container: "registry.opensuse.org/opensuse/leap:15.3" + + steps: + - name: "Seed GITHUB_PATH to work around possible @action/core bug" + shell: bash + run: 'echo "$PATH:/bin:/usr/bin" >> $GITHUB_PATH' + - name: "Install lsb-release" + shell: bash + run: "zypper install -y lsb-release" + - name: "Install util-linux" + shell: bash + run: "zypper install -y util-linux" + - name: "Install git" + shell: bash + run: "zypper install -y git" + - name: "Install curl" + shell: bash + run: "zypper install -y curl" + - name: "Ensure /run/sshd exists" + shell: bash + run: "mkdir -p /run/sshd" + - name: "Install openssh-server" + shell: bash + run: "zypper 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" + - 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: "opensuse_leap-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 /usr/src/packages/RPMS/*/*.rpm ." + - name: "Upload artifact" + uses: actions/upload-artifact@v3 + with: + name: "opensuse_leap" + path: "wezterm-*.rpm" diff --git a/.github/workflows/gen_opensuse_leap_continuous.yml b/.github/workflows/gen_opensuse_leap_continuous.yml new file mode 100644 index 000000000..e0ccc1a4b --- /dev/null +++ b/.github/workflows/gen_opensuse_leap_continuous.yml @@ -0,0 +1,114 @@ +name: opensuse_leap_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" + - ".github/workflows/verify-pages.yml" + - ".github/workflows/no-response.yml" + - ".github/ISSUE_TEMPLATE/*" + - "**/*.md" + +jobs: + build: + runs-on: "ubuntu-latest" + container: "registry.opensuse.org/opensuse/leap:15.3" + env: + BUILD_REASON: "Schedule" + + steps: + - name: "Seed GITHUB_PATH to work around possible @action/core bug" + shell: bash + run: 'echo "$PATH:/bin:/usr/bin" >> $GITHUB_PATH' + - name: "Install lsb-release" + shell: bash + run: "zypper install -y lsb-release" + - name: "Install util-linux" + shell: bash + run: "zypper install -y util-linux" + - name: "Install git" + shell: bash + run: "zypper install -y git" + - name: "Install curl" + shell: bash + run: "zypper install -y curl" + - name: "Ensure /run/sshd exists" + shell: bash + run: "mkdir -p /run/sshd" + - name: "Install openssh-server" + shell: bash + run: "zypper 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" + - 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: "opensuse_leap-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 /usr/src/packages/RPMS/*/*.rpm wezterm-nightly-opensuse_leap.rpm" + - name: "Upload artifact" + uses: actions/upload-artifact@v3 + with: + name: "opensuse_leap" + path: "wezterm-*.rpm" + retention-days: 5 + + upload: + runs-on: ubuntu-latest + needs: build + + steps: + - name: "Workaround git permissions issue" + shell: bash + run: "git config --global --add safe.directory /__w/wezterm/wezterm" + - name: "checkout repo" + uses: actions/checkout@v3 + - name: "Download artifact" + uses: actions/download-artifact@v3 + with: + name: "opensuse_leap" + - name: "Upload to Nightly Release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm" diff --git a/.github/workflows/gen_opensuse_leap_tag.yml b/.github/workflows/gen_opensuse_leap_tag.yml new file mode 100644 index 000000000..d464aecae --- /dev/null +++ b/.github/workflows/gen_opensuse_leap_tag.yml @@ -0,0 +1,105 @@ +name: opensuse_leap_tag + +on: + push: + tags: + - "20*" + +jobs: + build: + runs-on: "ubuntu-latest" + container: "registry.opensuse.org/opensuse/leap:15.3" + env: + BUILD_REASON: "Schedule" + + steps: + - name: "Seed GITHUB_PATH to work around possible @action/core bug" + shell: bash + run: 'echo "$PATH:/bin:/usr/bin" >> $GITHUB_PATH' + - name: "Install lsb-release" + shell: bash + run: "zypper install -y lsb-release" + - name: "Install util-linux" + shell: bash + run: "zypper install -y util-linux" + - name: "Install git" + shell: bash + run: "zypper install -y git" + - name: "Install curl" + shell: bash + run: "zypper install -y curl" + - name: "Ensure /run/sshd exists" + shell: bash + run: "mkdir -p /run/sshd" + - name: "Install openssh-server" + shell: bash + run: "zypper 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" + - 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: "opensuse_leap-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 /usr/src/packages/RPMS/*/*.rpm ." + - name: "Upload artifact" + uses: actions/upload-artifact@v3 + with: + name: "opensuse_leap" + path: "wezterm-*.rpm" + + upload: + runs-on: ubuntu-latest + needs: build + + steps: + - name: "Workaround git permissions issue" + shell: bash + run: "git config --global --add safe.directory /__w/wezterm/wezterm" + - name: "checkout repo" + uses: actions/checkout@v3 + - name: "Download artifact" + uses: actions/download-artifact@v3 + with: + name: "opensuse_leap" + - name: "Create pre-release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh bash ci/create-release.sh $(ci/tag-name.sh)" + - name: "Upload to Tagged Release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) wezterm-*.rpm" diff --git a/.github/workflows/gen_opensuse_tumbleweed.yml b/.github/workflows/gen_opensuse_tumbleweed.yml new file mode 100644 index 000000000..1d7e76533 --- /dev/null +++ b/.github/workflows/gen_opensuse_tumbleweed.yml @@ -0,0 +1,89 @@ +name: opensuse_tumbleweed + +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" + - ".github/workflows/verify-pages.yml" + - ".github/workflows/no-response.yml" + - ".github/ISSUE_TEMPLATE/*" + - "**/*.md" + +jobs: + build: + runs-on: "ubuntu-latest" + container: "registry.opensuse.org/opensuse/tumbleweed" + + steps: + - name: "Seed GITHUB_PATH to work around possible @action/core bug" + shell: bash + run: 'echo "$PATH:/bin:/usr/bin" >> $GITHUB_PATH' + - name: "Install lsb-release" + shell: bash + run: "zypper install -y lsb-release" + - name: "Install util-linux" + shell: bash + run: "zypper install -y util-linux" + - name: "Install git" + shell: bash + run: "zypper install -y git" + - name: "Install curl" + shell: bash + run: "zypper install -y curl" + - name: "Ensure /run/sshd exists" + shell: bash + run: "mkdir -p /run/sshd" + - name: "Install openssh-server" + shell: bash + run: "zypper 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" + - 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: "opensuse_tumbleweed-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 /usr/src/packages/RPMS/*/*.rpm ." + - name: "Upload artifact" + uses: actions/upload-artifact@v3 + with: + name: "opensuse_tumbleweed" + path: "wezterm-*.rpm" diff --git a/.github/workflows/gen_opensuse_tumbleweed_continuous.yml b/.github/workflows/gen_opensuse_tumbleweed_continuous.yml new file mode 100644 index 000000000..d70691044 --- /dev/null +++ b/.github/workflows/gen_opensuse_tumbleweed_continuous.yml @@ -0,0 +1,114 @@ +name: opensuse_tumbleweed_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" + - ".github/workflows/verify-pages.yml" + - ".github/workflows/no-response.yml" + - ".github/ISSUE_TEMPLATE/*" + - "**/*.md" + +jobs: + build: + runs-on: "ubuntu-latest" + container: "registry.opensuse.org/opensuse/tumbleweed" + env: + BUILD_REASON: "Schedule" + + steps: + - name: "Seed GITHUB_PATH to work around possible @action/core bug" + shell: bash + run: 'echo "$PATH:/bin:/usr/bin" >> $GITHUB_PATH' + - name: "Install lsb-release" + shell: bash + run: "zypper install -y lsb-release" + - name: "Install util-linux" + shell: bash + run: "zypper install -y util-linux" + - name: "Install git" + shell: bash + run: "zypper install -y git" + - name: "Install curl" + shell: bash + run: "zypper install -y curl" + - name: "Ensure /run/sshd exists" + shell: bash + run: "mkdir -p /run/sshd" + - name: "Install openssh-server" + shell: bash + run: "zypper 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" + - 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: "opensuse_tumbleweed-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 /usr/src/packages/RPMS/*/*.rpm wezterm-nightly-opensuse_tumbleweed.rpm" + - name: "Upload artifact" + uses: actions/upload-artifact@v3 + with: + name: "opensuse_tumbleweed" + path: "wezterm-*.rpm" + retention-days: 5 + + upload: + runs-on: ubuntu-latest + needs: build + + steps: + - name: "Workaround git permissions issue" + shell: bash + run: "git config --global --add safe.directory /__w/wezterm/wezterm" + - name: "checkout repo" + uses: actions/checkout@v3 + - name: "Download artifact" + uses: actions/download-artifact@v3 + with: + name: "opensuse_tumbleweed" + - name: "Upload to Nightly Release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh gh release upload --clobber nightly wezterm-*.rpm" diff --git a/.github/workflows/gen_opensuse_tumbleweed_tag.yml b/.github/workflows/gen_opensuse_tumbleweed_tag.yml new file mode 100644 index 000000000..f0751a195 --- /dev/null +++ b/.github/workflows/gen_opensuse_tumbleweed_tag.yml @@ -0,0 +1,105 @@ +name: opensuse_tumbleweed_tag + +on: + push: + tags: + - "20*" + +jobs: + build: + runs-on: "ubuntu-latest" + container: "registry.opensuse.org/opensuse/tumbleweed" + env: + BUILD_REASON: "Schedule" + + steps: + - name: "Seed GITHUB_PATH to work around possible @action/core bug" + shell: bash + run: 'echo "$PATH:/bin:/usr/bin" >> $GITHUB_PATH' + - name: "Install lsb-release" + shell: bash + run: "zypper install -y lsb-release" + - name: "Install util-linux" + shell: bash + run: "zypper install -y util-linux" + - name: "Install git" + shell: bash + run: "zypper install -y git" + - name: "Install curl" + shell: bash + run: "zypper install -y curl" + - name: "Ensure /run/sshd exists" + shell: bash + run: "mkdir -p /run/sshd" + - name: "Install openssh-server" + shell: bash + run: "zypper 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" + - 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: "opensuse_tumbleweed-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 /usr/src/packages/RPMS/*/*.rpm ." + - name: "Upload artifact" + uses: actions/upload-artifact@v3 + with: + name: "opensuse_tumbleweed" + path: "wezterm-*.rpm" + + upload: + runs-on: ubuntu-latest + needs: build + + steps: + - name: "Workaround git permissions issue" + shell: bash + run: "git config --global --add safe.directory /__w/wezterm/wezterm" + - name: "checkout repo" + uses: actions/checkout@v3 + - name: "Download artifact" + uses: actions/download-artifact@v3 + with: + name: "opensuse_tumbleweed" + - name: "Create pre-release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh bash ci/create-release.sh $(ci/tag-name.sh)" + - name: "Upload to Tagged Release" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash + run: "bash ci/retry.sh gh release upload --clobber $(ci/tag-name.sh) wezterm-*.rpm" diff --git a/ci/deploy.sh b/ci/deploy.sh index 8660faaee..427c3235e 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -124,11 +124,11 @@ case $OSTYPE in 7z a -tzip $zipname $zipdir iscc.exe -DMyAppVersion=${TAG_NAME#nightly} -F${instname} ci/windows-installer.iss ;; - linux-gnu) + linux-gnu|linux) distro=$(lsb_release -is 2>/dev/null || sh -c "source /etc/os-release && echo \$NAME") distver=$(lsb_release -rs 2>/dev/null || sh -c "source /etc/os-release && echo \$VERSION_ID") case "$distro" in - *Fedora*|*CentOS*) + *Fedora*|*CentOS*|*SUSE*) WEZTERM_RPM_VERSION=$(echo ${TAG_NAME#nightly-} | tr - _) cat > wezterm.spec < License: MIT URL: https://wezfurlong.org/wezterm/ Summary: Wez's Terminal Emulator. +%if 0%{?suse_version} +Requires: dbus-1, fontconfig, openssl, libxcb1, libxkbcommon0, libxkbcommon-x11-0, libwayland-client0, libwayland-egl1, libwayland-cursor0, Mesa-libEGL1, libxcb-keysyms1, libxcb-ewmh2, libxcb-icccm4 +%else Requires: dbus, fontconfig, openssl, libxcb, libxkbcommon, libxkbcommon-x11, libwayland-client, libwayland-egl, libwayland-cursor, mesa-libEGL, xcb-util-keysyms, xcb-util-wm +%endif %description wezterm is a terminal emulator with support for modern features diff --git a/ci/generate-workflows.py b/ci/generate-workflows.py index c51beb282..8c1fd66ec 100755 --- a/ci/generate-workflows.py +++ b/ci/generate-workflows.py @@ -158,6 +158,11 @@ class Target(object): if "alpine" in self.name: return True return False + + def uses_zypper(self): + if "suse" in self.name: + return True + return False def needs_sudo(self): if not self.container and self.uses_apt(): @@ -172,6 +177,8 @@ class Target(object): installer = "apt-get" elif self.uses_apk(): installer = "apk" + elif self.uses_zypper(): + installer = "zypper" else: return [] if self.needs_sudo(): @@ -182,7 +189,7 @@ class Target(object): return [RunStep(f"Install {name}", f"{installer} install -y {name}")] def install_curl(self): - if self.uses_yum() or self.uses_apk() or (self.uses_apt() and self.container): + if self.uses_yum() or self.uses_apk() or self.uses_zypper() or (self.uses_apt() and self.container): if "centos:stream9" in self.container: return self.install_system_package("curl-minimal") else: @@ -191,7 +198,7 @@ class Target(object): def install_openssh_server(self): steps = [] - if self.uses_yum() or (self.uses_apt() and self.container): + if self.uses_yum() or self.uses_zypper() or (self.uses_apt() and self.container): steps += [ RunStep("Ensure /run/sshd exists", "mkdir -p /run/sshd") ] + self.install_system_package("openssh-server") @@ -233,6 +240,8 @@ class Target(object): pre_reqs = "yum install -y wget curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker make" 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" + elif self.uses_zypper(): + pre_reqs = "zypper install -y wget libcurl-devel libexpat-devel gettext-tools libopenssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker make" steps.append( RunStep( @@ -395,6 +404,13 @@ cargo build --all --release""", f"mv ~/.abuild/*.pub wezterm-{self.name}.pub", ) ] + elif self.uses_zypper(): + steps.append( + RunStep( + "Move RPM", + f"mv /usr/src/packages/RPMS/*/*.rpm .", + ) + ) patterns = self.asset_patterns() glob = " ".join(patterns) @@ -410,7 +426,7 @@ cargo build --all --release""", def asset_patterns(self): patterns = [] - if self.uses_yum(): + if self.uses_yum() or self.uses_zypper(): patterns += ["wezterm-*.rpm"] elif "win" in self.name: patterns += ["WezTerm-*.zip", "WezTerm-*.exe"] @@ -446,6 +462,13 @@ cargo build --all --release""", f"mv ~/packages/wezterm/x86_64/*.apk wezterm-nightly-{self.name}.apk", ) ) + elif self.uses_zypper(): + steps.append( + RunStep( + "Move RPM", + f"mv /usr/src/packages/RPMS/*/*.rpm wezterm-nightly-{self.name}.rpm", + ) + ) patterns = self.asset_patterns() glob = " ".join(patterns) @@ -581,6 +604,18 @@ cargo build --all --release""", RunStep("Update APT", f"{sudo}apt update"), ] + if self.uses_zypper(): + if self.container: + steps += [ + RunStep( + "Seed GITHUB_PATH to work around possible @action/core bug", + f"echo \"$PATH:/bin:/usr/bin\" >> $GITHUB_PATH" + ), + RunStep( + "Install lsb-release & util-linux", + "zypper install -y lsb-release util-linux" + ), + ] if self.container: if ("fedora" in self.container) or ("centos" in self.container): steps += [ @@ -735,6 +770,8 @@ TARGETS = [ Target(container="alpine:3.13"), Target(container="alpine:3.14"), Target(container="alpine:3.15"), + Target(name="opensuse_leap", container="registry.opensuse.org/opensuse/leap:15.3"), + Target(name="opensuse_tumbleweed", container="registry.opensuse.org/opensuse/tumbleweed"), Target(name="windows", os="windows-latest", rust_target="x86_64-pc-windows-msvc"), ] diff --git a/get-deps b/get-deps index 2b40c8955..b94a567e9 100755 --- a/get-deps +++ b/get-deps @@ -106,7 +106,7 @@ suse_deps() { 'gcc' \ 'gcc-c++' \ 'fontconfig-devel' \ - 'openssl-devel' \ + 'libopenssl-devel' \ 'perl' \ 'python3' \ 'libxcb-devel' \