-
Notifications
You must be signed in to change notification settings - Fork 9
75 lines (66 loc) · 1.94 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
name: "CI"
on: ["push", "pull_request"]
env:
OTP_TAG: OTP-25.0.4
OTP_SOURCE: https://github.com/erlang/otp
jobs:
build:
name: "Build Android runtimes"
runs-on: "ubuntu-latest"
strategy:
matrix:
arch: ["arm", "arm64", "x86_64"]
steps:
- name: Setup elixir
uses: erlef/setup-beam@v1
with:
otp-version: 24.3.3
elixir-version: 1.13.4
- uses: actions/checkout@v2
- run: |
scripts/install_elixir.sh "$HOME/elixir"
echo "$HOME/elixir/bin" >> $GITHUB_PATH
- name: Build Android ${{ matrix.arch }} runtimes
run: |
mix deps.get
ARCH=${{ matrix.arch }} mix package.android.runtime
ARCH=${{ matrix.arch }} mix package.android.nif
- name: Archive Android runtimes
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.arch }}-runtime
path: _build/*.zip
- name: Android ${{ matrix.arch }} release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: _build/*.zip
ios:
name: "Build iOS runtime"
runs-on: "macos-latest"
steps:
- run: brew install git carthage coreutils
- uses: actions/checkout@v2
- name: Setup elixir
run: |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
. $HOME/.asdf/asdf.sh
asdf plugin add erlang
asdf plugin add elixir
echo "erlang 24.3.3" >> .tool-versions
echo "elixir 1.13.4-otp-24" >> .tool-versions
asdf install
- name: Build runtime
run: |
. $HOME/.asdf/asdf.sh
mix package.ios.runtime
- name: Archive runtimes
uses: actions/upload-artifact@v2
with:
name: iOS-runtime
path: _build/liberlang.xcframework
- name: iOS release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: _build/liberlang.xcframework