95 lines
2.5 KiB
YAML
95 lines
2.5 KiB
YAML
name: Build slim packages
|
|
|
|
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.runs-on }}
|
|
|
|
strategy:
|
|
matrix:
|
|
otp:
|
|
- erl23.3.4.9-3
|
|
os:
|
|
- ubuntu20.04
|
|
- centos7
|
|
runs-on:
|
|
- aws-amd64
|
|
- ubuntu-20.04
|
|
use-self-hosted:
|
|
- ${{ github.repository_owner == 'emqx' }}
|
|
exclude:
|
|
- runs-on: ubuntu-20.04
|
|
use-self-hosted: true
|
|
- runs-on: aws-amd64
|
|
use-self-hosted: false
|
|
|
|
container: emqx/build-env:${{ matrix.otp }}-${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: ./.github/actions/detect-profiles
|
|
with:
|
|
ci_git_token: ${{ secrets.CI_GIT_TOKEN }}
|
|
- name: fix-git-unsafe-repository
|
|
run: git config --global --add safe.directory /__w/emqx/emqx
|
|
- uses: actions/cache@v2
|
|
with:
|
|
# dialyzer PLTs
|
|
path: ~/.cache/rebar3/
|
|
key: dialyzer-${{ matrix.otp }}
|
|
- name: make xref
|
|
run: make xref
|
|
- name: make dialyzer
|
|
run: make dialyzer
|
|
- name: build zip packages
|
|
run: make ${EMQX_NAME}-zip
|
|
- name: build deb/rpm packages
|
|
run: make ${EMQX_NAME}-pkg
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: rebar3.crashdump
|
|
path: ./rebar3.crashdump
|
|
- name: packages test
|
|
run: |
|
|
export CODE_PATH=$GITHUB_WORKSPACE
|
|
.ci/build_packages/tests.sh
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ matrix.os }}
|
|
path: _packages/**/*.zip
|
|
|
|
mac:
|
|
strategy:
|
|
matrix:
|
|
otp:
|
|
- 23.3.4.9-3
|
|
os:
|
|
- macos-11
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: ./.github/actions/detect-profiles
|
|
with:
|
|
ci_git_token: ${{ secrets.CI_GIT_TOKEN }}
|
|
- uses: ./.github/actions/package-macos
|
|
with:
|
|
otp: ${{ matrix.otp }}
|
|
os: ${{ matrix.os }}
|
|
apple_id_password: ${{ secrets.APPLE_ID_PASSWORD }}
|
|
apple_developer_identity: ${{ secrets.APPLE_DEVELOPER_IDENTITY }}
|
|
apple_developer_id_bundle: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE }}
|
|
apple_developer_id_bundle_password: ${{ secrets.APPLE_DEVELOPER_ID_BUNDLE_PASSWORD }}
|
|
- uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: rebar3.crashdump
|
|
path: ./rebar3.crashdump
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: macos
|
|
path: _packages/**/*.zip
|