ci: in 'prepare' step, make clean-all before fetch deps
This commit is contained in:
parent
7b7fb6c09e
commit
ccb289974a
|
@ -77,7 +77,12 @@ jobs:
|
||||||
echo "VERSION=$(./pkg-vsn.sh $PROFILE)" >> $GITHUB_OUTPUT
|
echo "VERSION=$(./pkg-vsn.sh $PROFILE)" >> $GITHUB_OUTPUT
|
||||||
- name: get_all_deps
|
- name: get_all_deps
|
||||||
run: |
|
run: |
|
||||||
make -C source deps-all
|
pushd 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
|
||||||
|
popd
|
||||||
zip -ryq source.zip source/* source/.[^.]*
|
zip -ryq source.zip source/* source/.[^.]*
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -175,6 +180,8 @@ jobs:
|
||||||
linux:
|
linux:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
runs-on: ${{ matrix.build_machine }}
|
runs-on: ${{ matrix.build_machine }}
|
||||||
|
# always run in builder container because the host might have the wrong OTP version etc.
|
||||||
|
# otherwise buildx.sh does not run docker if arch and os matches the target arch and os.
|
||||||
container:
|
container:
|
||||||
image: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"
|
image: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"
|
||||||
|
|
||||||
|
@ -249,12 +256,9 @@ jobs:
|
||||||
- name: build emqx packages
|
- name: build emqx packages
|
||||||
working-directory: source
|
working-directory: source
|
||||||
env:
|
env:
|
||||||
BUILDER: ${{ matrix.builder }}
|
|
||||||
ELIXIR: ${{ matrix.elixir }}
|
ELIXIR: ${{ matrix.elixir }}
|
||||||
OTP: ${{ matrix.otp }}
|
|
||||||
PROFILE: ${{ matrix.profile }}
|
PROFILE: ${{ matrix.profile }}
|
||||||
ARCH: ${{ matrix.arch }}
|
ARCH: ${{ matrix.arch }}
|
||||||
SYSTEM: ${{ matrix.os }}
|
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
git config --global --add safe.directory "/__w/emqx/emqx"
|
git config --global --add safe.directory "/__w/emqx/emqx"
|
||||||
|
@ -278,7 +282,7 @@ jobs:
|
||||||
--pkgtype "${PKGTYPE}" \
|
--pkgtype "${PKGTYPE}" \
|
||||||
--arch "${ARCH}" \
|
--arch "${ARCH}" \
|
||||||
--elixir "${IS_ELIXIR}" \
|
--elixir "${IS_ELIXIR}" \
|
||||||
--builder "ghcr.io/emqx/emqx-builder/${BUILDER}:${ELIXIR}-${OTP}-${SYSTEM}"
|
--builder "builder_to_be_ignored"
|
||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: success()
|
if: success()
|
||||||
|
|
|
@ -28,7 +28,12 @@ jobs:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: get_all_deps
|
- name: get_all_deps
|
||||||
run: |
|
run: |
|
||||||
make -C source deps-all
|
pushd 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
|
||||||
|
popd
|
||||||
zip -ryq source.zip source/* source/.[^.]*
|
zip -ryq source.zip source/* source/.[^.]*
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
|
@ -38,6 +43,10 @@ jobs:
|
||||||
linux:
|
linux:
|
||||||
needs: prepare
|
needs: prepare
|
||||||
runs-on: aws-${{ matrix.arch }}
|
runs-on: aws-${{ matrix.arch }}
|
||||||
|
# always run in builder container because the host might have the wrong OTP version etc.
|
||||||
|
# otherwise buildx.sh does not run docker if arch and os matches the target arch and os.
|
||||||
|
container:
|
||||||
|
image: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }}"
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -72,12 +81,9 @@ jobs:
|
||||||
- name: build emqx packages
|
- name: build emqx packages
|
||||||
working-directory: source
|
working-directory: source
|
||||||
env:
|
env:
|
||||||
BUILDER: ${{ matrix.builder }}
|
|
||||||
ELIXIR: ${{ matrix.elixir }}
|
ELIXIR: ${{ matrix.elixir }}
|
||||||
OTP: ${{ matrix.otp }}
|
|
||||||
PROFILE: ${{ matrix.profile[0] }}
|
PROFILE: ${{ matrix.profile[0] }}
|
||||||
ARCH: ${{ matrix.arch }}
|
ARCH: ${{ matrix.arch }}
|
||||||
OS: ${{ matrix.os }}
|
|
||||||
run: |
|
run: |
|
||||||
set -eu
|
set -eu
|
||||||
PKGTYPES="tgz pkg"
|
PKGTYPES="tgz pkg"
|
||||||
|
@ -89,7 +95,7 @@ jobs:
|
||||||
--pkgtype "${PKGTYPE}" \
|
--pkgtype "${PKGTYPE}" \
|
||||||
--arch "${ARCH}" \
|
--arch "${ARCH}" \
|
||||||
--elixir "${IS_ELIXIR}" \
|
--elixir "${IS_ELIXIR}" \
|
||||||
--builder "ghcr.io/emqx/emqx-builder/${BUILDER}:${ELIXIR}-${OTP}-${OS}
|
--builder "builder_to_be_ignored"
|
||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: success()
|
if: success()
|
||||||
|
|
Loading…
Reference in New Issue