ci: no need to prepare source zip
source.zip was need in v4 enterprise because the rebar3 deps fetch had to be done in the github runner host, but not inside the runner docker containers. now that all dependencies are opensource, there is no need for this step any more.
This commit is contained in:
parent
22815d4cec
commit
a7f8e33321
|
@ -26,19 +26,15 @@ jobs:
|
||||||
BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }}
|
BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }}
|
||||||
IS_EXACT_TAG: ${{ steps.get_profile.outputs.IS_EXACT_TAG }}
|
IS_EXACT_TAG: ${{ steps.get_profile.outputs.IS_EXACT_TAG }}
|
||||||
VERSION: ${{ steps.get_profile.outputs.VERSION }}
|
VERSION: ${{ steps.get_profile.outputs.VERSION }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.branch_or_tag }} # when input is not given, the event tag is used
|
ref: ${{ github.event.inputs.branch_or_tag }} # when input is not given, the event tag is used
|
||||||
path: source
|
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Get profile to build
|
- name: Get profile to build
|
||||||
id: get_profile
|
id: get_profile
|
||||||
run: |
|
run: |
|
||||||
cd source
|
|
||||||
git config --global --add safe.directory "$(pwd)"
|
|
||||||
tag=${{ github.ref }}
|
tag=${{ github.ref }}
|
||||||
if git describe --tags --match "[v|e]*" --exact; then
|
if git describe --tags --match "[v|e]*" --exact; then
|
||||||
echo "WARN: This is an exact git tag, will publish release"
|
echo "WARN: This is an exact git tag, will publish release"
|
||||||
|
@ -75,36 +71,21 @@ jobs:
|
||||||
esac
|
esac
|
||||||
echo "BUILD_PROFILE=$PROFILE" >> $GITHUB_OUTPUT
|
echo "BUILD_PROFILE=$PROFILE" >> $GITHUB_OUTPUT
|
||||||
echo "VERSION=$(./pkg-vsn.sh $PROFILE)" >> $GITHUB_OUTPUT
|
echo "VERSION=$(./pkg-vsn.sh $PROFILE)" >> $GITHUB_OUTPUT
|
||||||
- name: get_all_deps
|
|
||||||
run: |
|
|
||||||
cd source
|
|
||||||
# make sure all previous left-overs are cleaned
|
|
||||||
make clean-all
|
|
||||||
# enterprise is a super-set, should be enough for all profiles
|
|
||||||
make deps-emqx-enterprise
|
|
||||||
cd ..
|
|
||||||
zip -ryq source.zip source/* source/.[^.]*
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: source
|
|
||||||
path: source.zip
|
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
if: startsWith(github.ref_name, 'v')
|
if: startsWith(github.ref_name, 'v')
|
||||||
needs: prepare
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
profile: # for now only CE for windows
|
profile: # for now only CE for windows
|
||||||
- emqx
|
- emqx
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
name: source
|
ref: ${{ github.event.inputs.branch_or_tag }}
|
||||||
path: .
|
fetch-depth: 0
|
||||||
- name: unzip source code
|
|
||||||
run: Expand-Archive -Path source.zip -DestinationPath ./
|
|
||||||
- uses: ilammy/msvc-dev-cmd@v1.12.0
|
- uses: ilammy/msvc-dev-cmd@v1.12.0
|
||||||
- uses: erlef/setup-beam@v1.15.2
|
- uses: erlef/setup-beam@v1.15.2
|
||||||
with:
|
with:
|
||||||
|
@ -113,14 +94,12 @@ jobs:
|
||||||
env:
|
env:
|
||||||
PYTHON: python
|
PYTHON: python
|
||||||
DIAGNOSTIC: 1
|
DIAGNOSTIC: 1
|
||||||
working-directory: source
|
|
||||||
run: |
|
run: |
|
||||||
# ensure crypto app (openssl)
|
# ensure crypto app (openssl)
|
||||||
erl -eval "erlang:display(crypto:info_lib())" -s init stop
|
erl -eval "erlang:display(crypto:info_lib())" -s init stop
|
||||||
make ${{ matrix.profile }}-tgz
|
make ${{ matrix.profile }}-tgz
|
||||||
- name: run emqx
|
- name: run emqx
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
working-directory: source
|
|
||||||
run: |
|
run: |
|
||||||
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start
|
./_build/${{ matrix.profile }}/rel/emqx/bin/emqx start
|
||||||
Start-Sleep -s 5
|
Start-Sleep -s 5
|
||||||
|
@ -135,7 +114,7 @@ jobs:
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.profile }}
|
name: ${{ matrix.profile }}
|
||||||
path: source/_packages/${{ matrix.profile }}/
|
path: _packages/${{ matrix.profile }}/
|
||||||
|
|
||||||
mac:
|
mac:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
|
@ -153,15 +132,10 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: emqx/self-hosted-cleanup-action@v1.0.3
|
- uses: emqx/self-hosted-cleanup-action@v1.0.3
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
name: source
|
ref: ${{ github.event.inputs.branch_or_tag }}
|
||||||
path: .
|
fetch-depth: 0
|
||||||
- name: unzip source code
|
|
||||||
run: |
|
|
||||||
ln -s . source
|
|
||||||
unzip -o -q source.zip
|
|
||||||
rm source source.zip
|
|
||||||
- uses: ./.github/actions/package-macos
|
- uses: ./.github/actions/package-macos
|
||||||
with:
|
with:
|
||||||
profile: ${{ matrix.profile }}
|
profile: ${{ matrix.profile }}
|
||||||
|
@ -242,19 +216,13 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: AutoModality/action-clean@v1
|
- uses: AutoModality/action-clean@v1
|
||||||
if: matrix.build_machine == 'aws-arm64'
|
if: matrix.build_machine == 'aws-arm64'
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
name: source
|
ref: ${{ github.event.inputs.branch_or_tag }}
|
||||||
path: .
|
fetch-depth: 0
|
||||||
- name: unzip source code
|
|
||||||
run: unzip -q source.zip
|
|
||||||
- name: tmp fix for el9
|
|
||||||
if: matrix.os == 'el9'
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
dnf install -y krb5-devel
|
|
||||||
- name: build emqx packages
|
- name: build emqx packages
|
||||||
working-directory: source
|
|
||||||
env:
|
env:
|
||||||
ELIXIR: ${{ matrix.elixir }}
|
ELIXIR: ${{ matrix.elixir }}
|
||||||
PROFILE: ${{ matrix.profile }}
|
PROFILE: ${{ matrix.profile }}
|
||||||
|
@ -289,7 +257,7 @@ jobs:
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.profile }}
|
name: ${{ matrix.profile }}
|
||||||
path: source/_packages/${{ matrix.profile }}/
|
path: _packages/${{ matrix.profile }}/
|
||||||
|
|
||||||
publish_artifacts:
|
publish_artifacts:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
|
@ -7,39 +7,9 @@ concurrency:
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 */6 * * *'
|
- cron: '0 */6 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prepare:
|
|
||||||
runs-on: aws-amd64
|
|
||||||
if: github.repository_owner == 'emqx'
|
|
||||||
container: ghcr.io/emqx/emqx-builder/5.0-34:1.13.4-24.3.4.2-3-ubuntu22.04
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
profile:
|
|
||||||
- ['emqx', 'master']
|
|
||||||
- ['emqx-enterprise', 'release-50']
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
ref: ${{ matrix.profile[1] }}
|
|
||||||
path: source
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: get_all_deps
|
|
||||||
run: |
|
|
||||||
cd source
|
|
||||||
# make sure all previous left-overs are cleaned
|
|
||||||
make clean-all
|
|
||||||
# enterprise is a super-set, should be enough for all profiles
|
|
||||||
make deps-emqx-enterprise
|
|
||||||
cd ..
|
|
||||||
zip -ryq source.zip source/* source/.[^.]*
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: source-${{ matrix.profile[0] }}
|
|
||||||
path: source.zip
|
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
runs-on: aws-${{ matrix.arch }}
|
runs-on: aws-${{ matrix.arch }}
|
||||||
|
@ -54,6 +24,9 @@ jobs:
|
||||||
profile:
|
profile:
|
||||||
- emqx
|
- emqx
|
||||||
- emqx-enterprise
|
- emqx-enterprise
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
- release-50
|
||||||
otp:
|
otp:
|
||||||
- 24.3.4.2-3
|
- 24.3.4.2-3
|
||||||
arch:
|
arch:
|
||||||
|
@ -71,18 +44,16 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: AutoModality/action-clean@v1
|
- uses: emqx/self-hosted-cleanup-action@v1.0.3
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
name: source-${{ matrix.profile }}
|
ref: ${{ matrix.branch }}
|
||||||
path: .
|
fetch-depth: 0
|
||||||
- name: unzip source code
|
|
||||||
run: unzip -q source.zip
|
|
||||||
- name: build emqx packages
|
- name: build emqx packages
|
||||||
working-directory: source
|
|
||||||
env:
|
env:
|
||||||
ELIXIR: ${{ matrix.elixir }}
|
ELIXIR: ${{ matrix.elixir }}
|
||||||
PROFILE: ${{ matrix.profile[0] }}
|
PROFILE: ${{ matrix.profile }}
|
||||||
ARCH: ${{ matrix.arch }}
|
ARCH: ${{ matrix.arch }}
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
|
@ -101,7 +72,7 @@ jobs:
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.profile }}
|
name: ${{ matrix.profile }}
|
||||||
path: source/_packages/${{ matrix.profile }}/
|
path: _packages/${{ matrix.profile }}/
|
||||||
- name: Send notification to Slack
|
- name: Send notification to Slack
|
||||||
uses: slackapi/slack-github-action@v1.23.0
|
uses: slackapi/slack-github-action@v1.23.0
|
||||||
if: failure()
|
if: failure()
|
||||||
|
@ -126,15 +97,10 @@ jobs:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: emqx/self-hosted-cleanup-action@v1.0.3
|
- uses: emqx/self-hosted-cleanup-action@v1.0.3
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
name: source-${{ matrix.profile }}
|
ref: ${{ matrix.branch }}
|
||||||
path: .
|
fetch-depth: 0
|
||||||
- name: unzip source code
|
|
||||||
run: |
|
|
||||||
ln -s . source
|
|
||||||
unzip -o -q source.zip
|
|
||||||
rm source source.zip
|
|
||||||
- uses: ./.github/actions/package-macos
|
- uses: ./.github/actions/package-macos
|
||||||
with:
|
with:
|
||||||
profile: ${{ matrix.profile }}
|
profile: ${{ matrix.profile }}
|
||||||
|
|
Loading…
Reference in New Issue