-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (76 loc) · 2.66 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
on:
push:
branches: [main]
env:
OTP_RELEASE: 22.0.7
jobs:
create_release:
runs-on: ubuntu-20.04
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: release-${{ github.run_id }}
release_name: Release ${{ github.run_id }}
draft: false
prerelease: false
build_and_upload:
strategy:
matrix:
platform: [ubuntu-20.04, macos-10.15]
wx: [headless, graphical]
src: [src, no-src]
runs-on: ${{ matrix.platform }}
needs: create_release
steps:
- name: checkout this repo
uses: actions/checkout@v2
- name: checkout kerl repo
uses: actions/checkout@v2
with:
repository: kerl/kerl
path: kerl
- name: checkout wxwidgets repo
if: ${{ matrix.wx == 'graphical' }}
uses: actions/checkout@v2
with:
repository: wxWidgets/wxWidgets
ref: WX_3_0_BRANCH
path: wxwidgets
- name: Build wxWidgets
if: ${{ matrix.wx == 'graphical' }}
shell: bash
run: |
set -ex
./build_wxwidgets.bash wxwidgets ~/wx-install
- name: Build OTP
shell: bash
run: |
set -ex
PATH="${PATH}:${HOME}/wx-install/bin"
export KERL_CONFIGURE_DISABLE_APPLICATIONS="megaco eldap snmp mnesia et diameter"
kerl/kerl build ${OTP_RELEASE}
RELEASE_DIR="R${OTP_RELEASE}"
kerl/kerl install ${OTP_RELEASE} ${RELEASE_DIR}
[[ $INCLUDE_OTP_SRC == 'no-src' ]] && rm -rf ${RELEASE_DIR}/lib/*/src
tar -czf my_release.tar.gz ${RELEASE_DIR}/*
env:
DEVELOPER_DIR: /Applications/Xcode_11.3.1.app/Contents/Developer
INCLUDE_OTP_SRC: ${{ matrix.src }}
- name: Upload Release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./my_release.tar.gz
asset_name: otp_${{ env.OTP_RELEASE }}_${{ matrix.platform }}_${{ matrix.wx }}_${{ matrix.src }}.tar.gz
asset_content_type: application/gzip