From c232ba7315936a2ed84ee8b79c9847d3eba4833a Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 16 Jun 2022 00:40:32 +0200 Subject: [PATCH 1/2] ci: delete old release job --- .github/workflows/main.yml | 181 ------------------------------------- 1 file changed, 181 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 35078c20..a10913a6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,19 +47,6 @@ jobs: path: _build/test/logs retention-days: 1 - - name: build rel tar file - if: startsWith(github.ref, 'refs/tags/') - run: | - export PATH="/usr/local/opt/erlang@${{ matrix.otp }}/bin:$PATH" - make tar - mv _build/default/rel/quicer/quicer-*.tar.gz quicer.tar.gz - - - name: upload rel tar file - uses: actions/upload-artifact@v2 - with: - name: quicer-${{ matrix.os }}-otp${{ matrix.otp }} - path: quicer.tar.gz - retention-days: 1 linux: runs-on: ubuntu-latest @@ -138,171 +125,3 @@ jobs: run: | make tar mv _build/default/rel/quicer/quicer-*.tar.gz quicer.tar.gz - - - name: upload rel tar file - if: startsWith(github.ref, 'refs/tags/') - uses: actions/upload-artifact@v2 - with: - name: quicer-linux-${{ matrix.otp }}-${{ matrix.arch }}-${{ matrix.build_type }}-logging-${{ matrix.logging }} - path: quicer.tar.gz - retention-days: 1 - - make-release: - runs-on: ubuntu-latest - if: startsWith(github.event.ref, 'refs/tags/') - needs: [linux, mac, multiarch] - outputs: - upload_url: ${{ steps.create_release.outputs.upload_url }} - steps: - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: true - - linux-release-upload-artifact: - needs: make-release - runs-on: ubuntu-latest - if: startsWith(github.event.ref, 'refs/tags/') - strategy: - matrix: - otp: [22.3.4.9, 23.3.4.5, 24.3.3] - os: - - linux - arch: - - x86_64 - steps: - - name: Download artifact - uses: actions/download-artifact@v2 - - - name: Check downloads - run: | - tree - - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.make-release.outputs.upload_url }} - asset_path: quicer-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-RelWithDebInfo-logging-false/quicer.tar.gz - asset_name: quicer-${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}/quicer.tar.gz - asset_content_type: application/zip - - mac-release-upload-artifact: - if: startsWith(github.event.ref, 'refs/tags/') - needs: make-release - strategy: - matrix: - os: - - macos-10.15 - - macos-11 - otp: - - 23 - - 24 - runs-on: ${{ matrix.os }} - steps: - - name: Download artifact - uses: actions/download-artifact@v2 - - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.make-release.outputs.upload_url }} - asset_path: quicer-${{ matrix.os }}-otp${{ matrix.otp }}/quicer.tar.gz - asset_name: quicer-${{ matrix.os }}-otp${{ matrix.otp }}/quicer.tar.gz - asset_content_type: application/zip - - multiarch: - ### note: - ### - only verify compilation because qemu user env has no support for some socket opt - runs-on: ubuntu-latest - steps: - - run: | - docker run --rm --privileged multiarch/qemu-user-static:register --reset - - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: make ci arm32v7 - uses: docker://emqx/build-env:erl24.0.1-emqx-1-alpine-arm32v7 - with: - args: | - make tar - - - name: move arm32v7 - if: startsWith(github.event.ref, 'refs/tags/') - run: | - sudo mv _build/default/rel/quicer/quicer-*.tar.gz quicer.tar.gz - sudo chmod o+r quicer.tar.gz - - - name: upload rel tar file - if: startsWith(github.event.ref, 'refs/tags/') - uses: actions/upload-artifact@v2 - with: - name: quicer-linux-24.0.1-arm32v7 - path: quicer.tar.gz - retention-days: 3 - - - name: make ci arm64v8 - uses: docker://emqx/build-env:erl24.0.1-emqx-1-alpine-arm64v8 - with: - args: | - make clean tar - - - name: move arm64v8 - if: startsWith(github.event.ref, 'refs/tags/') - run: | - sudo mv _build/default/rel/quicer/quicer-*.tar.gz quicer.tar.gz - sudo chmod o+r quicer.tar.gz - - - name: upload rel tar file - if: startsWith(github.event.ref, 'refs/tags/') - uses: actions/upload-artifact@v2 - with: - name: quicer-linux-24.0.1-arm64v8 - path: quicer.tar.gz - retention-days: 3 - - - name: Archive CT Logs - uses: actions/upload-artifact@v2 - if: failure() - with: - name: linux-ct-logs - path: _build/test/ - retention-days: 3 - - multiarch-release-upload-artifact: - if: startsWith(github.event.ref, 'refs/tags/') - needs: make-release - strategy: - matrix: - arch: - - arm64v8 - - arm32v7 - runs-on: ubuntu-latest - steps: - - name: Download artifact - uses: actions/download-artifact@v2 - - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.make-release.outputs.upload_url }} - asset_path: quicer-linux-24.0.1-${{ matrix.arch }}/quicer.tar.gz - asset_name: quicer-linux-24.0.1-${{ matrix.arch }}/quicer.tar.gz - asset_content_type: application/zip From 3bf459a687061c78413618bdf411ae51e05eb973 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 16 Jun 2022 07:48:03 +0200 Subject: [PATCH 2/2] ci: fix function return --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 847a0d2b..6cfff690 100755 --- a/build.sh +++ b/build.sh @@ -40,7 +40,7 @@ download() { fi fi - echo "$(cat "_packages/${PKGNAME}.sha256") _packages/${PKGNAME}" | sha256sum -c || exit 1 + echo "$(cat "_packages/${PKGNAME}.sha256") _packages/${PKGNAME}" | sha256sum -c || return 1 gzip -c -d "_packages/${PKGNAME}" > "$TARGET_SO" erlc -I include src/quicer_nif.erl