Skip to content

Commit

Permalink
compress output binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
dan moore authored and dan moore committed Sep 30, 2022
1 parent eff6270 commit e0660f6
Showing 1 changed file with 15 additions and 20 deletions.
35 changes: 15 additions & 20 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,23 @@ on:

jobs:

# awx compatible binary with correct version of gcc and clang
binary_centos7_amd64:
binary_linux_amd64:
runs-on: ubuntu-latest
container:
image: amd64/centos:centos7
steps:
- uses: actions/checkout@v2
- name: install cargo deps and build avail
shell: bash
run: |
yum install centos-release-scl -y
yum install llvm-toolset-7 -y
yum install gcc-c++ -y
scl enable llvm-toolset-7 bash
export PATH="/opt/rh/llvm-toolset-7/root/usr/bin:$PATH"
export LIBCLANG_PATH="/opt/rh/llvm-toolset-7/root/usr/lib64/"
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
cargo build --release -p data-avail
mv target/release/data-avail target/release/data-avail-centos7-amd64
mv target/release/data-avail target/release/data-avail-linux-amd64
- uses: actions/upload-artifact@v2
with:
name: data-avail-centos7-amd64-binary
path: target/release/data-avail-centos7-amd64

binary_linux_amd64:
name: data-avail-linux-amd64-binary
path: target/release/data-avail-linux-amd64
binary_linux_amd64_tar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -43,10 +35,13 @@ jobs:
source "$HOME/.cargo/env"
cargo build --release -p data-avail
mv target/release/data-avail target/release/data-avail-linux-amd64
pushd target/release/
tar czf data-avail-linux-amd64.tar.gz data-avail-linux-amd64
popd
- uses: actions/upload-artifact@v2
with:
name: data-avail-linux-amd64-binary
path: target/release/data-avail-linux-amd64
name: data-avail-linux-amd64-tar
path: target/release/data-avail-linux-amd64.tar.gz

binary_linux_aarch64:
runs-on: ubuntu-latest
Expand All @@ -73,15 +68,15 @@ jobs:

# compile all binaries from previous jobs into single release
binary_publish:
needs: [binary_centos7_amd64, binary_linux_amd64, binary_linux_aarch64]
needs: [binary_linux_amd64, binary_linux_amd64_tar, binary_linux_aarch64]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: data-avail-centos7-amd64-binary
name: data-avail-linux-amd64-binary
- uses: actions/download-artifact@v2
with:
name: data-avail-linux-amd64-binary
name: data-avail-linux-amd64-tar
- uses: actions/download-artifact@v2
with:
name: data-avail-linux-aarch64-tar
Expand Down

0 comments on commit e0660f6

Please sign in to comment.