Skip to content

Commit

Permalink
Merge pull request #97 from emqx/ci-delete-old-release-job
Browse files Browse the repository at this point in the history
ci: delete old release job
  • Loading branch information
zmstone authored Jun 16, 2022
2 parents 3a7167a + 3bf459a commit cb266c5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 182 deletions.
181 changes: 0 additions & 181 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cb266c5

Please sign in to comment.