Skip to content

Commit

Permalink
Merge pull request #1066 from zowe/next-zowex-rhel7
Browse files Browse the repository at this point in the history
Make zowex Linux binary compatible with more distros
  • Loading branch information
t1m0thyj authored Jul 21, 2021
2 parents 73925bb + 0cf6284 commit bc0c6f0
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 16 deletions.
69 changes: 55 additions & 14 deletions .github/workflows/rust-cli-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,27 @@ jobs:
zowex/**
!.git
build-ubuntu-mac:
build-linux:
name: Build

needs: release

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
# Need to build in container with old version of GLIBC to support RHEL 7
# https://kobzol.github.io/rust/ci/2021/05/07/building-rust-binaries-in-ci-that-work-with-older-glibc.html
container: quay.io/pypa/manylinux2014_x86_64

steps:

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- uses: actions/download-artifact@v2
with:
name: repo
Expand All @@ -90,21 +97,55 @@ jobs:
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: target/release/zowex.tgz
asset_name: "${{matrix.os}}/zowex.tgz"
asset_name: zowex-linux.tgz
asset_content_type: application/octet-stream


build-windows:
build-macos:
name: Build

needs: release

runs-on: ${{ matrix.os }}
runs-on: macos-latest

steps:

- uses: actions/download-artifact@v2
with:
name: repo

- name: Build
run: cargo build --verbose --release

- name: Get Upload URL
id: get_upload_url
run: echo "::set-output name=upload_url::$(cat release_url.txt)"

- run: echo ${{ steps.get_upload_url.outputs.upload_url }}

- name: Create Archive
run: |
cd target/release
tar -cvzf zowex.tgz zowex
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: target/release/zowex.tgz
asset_name: zowex-macos.tgz
asset_content_type: application/octet-stream


build-windows:
name: Build

needs: release

strategy:
fail-fast: false
matrix:
os: [windows-latest]
runs-on: windows-latest

steps:

Expand Down Expand Up @@ -134,5 +175,5 @@ jobs:
with:
upload_url: ${{ steps.get_upload_url.outputs.upload_url }}
asset_path: target\release\zowex.tgz
asset_name: "${{matrix.os}}/zowex.tgz"
asset_name: zowex-windows.tgz
asset_content_type: application/octet-stream
2 changes: 1 addition & 1 deletion zowex/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion zowex/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zowex"
version = "0.2.0"
version = "0.2.1"
authors = ["Zowe Project"]
edition = "2018"

Expand Down

0 comments on commit bc0c6f0

Please sign in to comment.