From b4c30fb2dabebecff726eeb5e5a47b9aeaa6b6de Mon Sep 17 00:00:00 2001 From: Cwen Yin Date: Wed, 17 Aug 2022 13:33:49 +0800 Subject: [PATCH 1/2] Fix some minor bugs Signed-off-by: Cwen Yin --- .github/workflows/release_latest.yml | 12 ++++-------- .github/workflows/release_tag.yml | 24 +++++++++++++----------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release_latest.yml b/.github/workflows/release_latest.yml index bfec430c..2abde623 100644 --- a/.github/workflows/release_latest.yml +++ b/.github/workflows/release_latest.yml @@ -23,14 +23,10 @@ jobs: - name: Prepare build environment run: | - # actions/checkout require git v2.X - if [ "${{ matrix.arch }}" == "amd64" ]; then - yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm - fi - yum install -y gcc - yum install -y make - yum install -y binutils - yum install -y git + yum install -y gcc make binutils centos-release-scl + yum install -y rh-git227-git + echo /opt/rh/rh-git227/root/usr/bin >> $GITHUB_PATH + echo "LD_LIBRARY_PATH=/opt/rh/httpd24/root/usr/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV - uses: actions/checkout@master with: diff --git a/.github/workflows/release_tag.yml b/.github/workflows/release_tag.yml index e6d440ba..73f70d96 100644 --- a/.github/workflows/release_tag.yml +++ b/.github/workflows/release_tag.yml @@ -6,9 +6,13 @@ on: jobs: run: name: Upload - runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + arch: [amd64, arm64] + runs-on: ${{ fromJson('{"amd64":"ubuntu-latest", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }} # glibc version 2.17 - container: docker.io/centos:7.2.1511 + container: ${{ fromJson('{"amd64":"docker.io/centos:7.2.1511", "arm64":"docker.io/centos:centos7"}')[matrix.arch] }} steps: - name: Set up Go 1.18 uses: actions/setup-go@v1 @@ -18,12 +22,10 @@ jobs: - name: Prepare build environment run: | - # actions/checkout require git v2.X - yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm - yum install -y gcc - yum install -y make - yum install -y binutils - yum install -y git + yum install -y gcc make binutils centos-release-scl + yum install -y rh-git227-git + echo /opt/rh/rh-git227/root/usr/bin >> $GITHUB_PATH + echo "LD_LIBRARY_PATH=/opt/rh/httpd24/root/usr/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV - uses: actions/checkout@master with: @@ -45,6 +47,6 @@ jobs: - name: Upload files run: | GIT_TAG=${GITHUB_REF##*/} - mv bin chaosd-${GIT_TAG}-linux-amd64 - tar czvf chaosd-${GIT_TAG}-linux-amd64.tar.gz chaosd-${GIT_TAG}-linux-amd64 - aws s3 cp chaosd-${GIT_TAG}-linux-amd64.tar.gz ${{ secrets.AWS_BUCKET_NAME }}/chaosd-${GIT_TAG}-linux-amd64.tar.gz + mv bin chaosd-${GIT_TAG}-linux-${{ matrix.arch }} + tar czvf chaosd-${GIT_TAG}-linux-${{ matrix.arch }}.tar.gz chaosd-${GIT_TAG}-linux-${{ matrix.arch }} + aws s3 cp chaosd-${GIT_TAG}-linux-${{ matrix.arch }}.tar.gz ${{ secrets.AWS_BUCKET_NAME }}/chaosd-${GIT_TAG}-linux-${{ matrix.arch }}.tar.gz From 36331e3bf663ee6f5d2036a508b2717a13b538fe Mon Sep 17 00:00:00 2001 From: Cwen Yin Date: Wed, 17 Aug 2022 14:18:02 +0800 Subject: [PATCH 2/2] add some comments Signed-off-by: Cwen Yin --- .github/workflows/release_latest.yml | 1 + .github/workflows/release_tag.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/release_latest.yml b/.github/workflows/release_latest.yml index 2abde623..7b7c3c11 100644 --- a/.github/workflows/release_latest.yml +++ b/.github/workflows/release_latest.yml @@ -23,6 +23,7 @@ jobs: - name: Prepare build environment run: | + # actions/checkout require git v2.X yum install -y gcc make binutils centos-release-scl yum install -y rh-git227-git echo /opt/rh/rh-git227/root/usr/bin >> $GITHUB_PATH diff --git a/.github/workflows/release_tag.yml b/.github/workflows/release_tag.yml index 73f70d96..f212c66a 100644 --- a/.github/workflows/release_tag.yml +++ b/.github/workflows/release_tag.yml @@ -22,6 +22,7 @@ jobs: - name: Prepare build environment run: | + # actions/checkout require git v2.X yum install -y gcc make binutils centos-release-scl yum install -y rh-git227-git echo /opt/rh/rh-git227/root/usr/bin >> $GITHUB_PATH