@@ -22,60 +22,30 @@ concurrency:
22
22
23
23
jobs :
24
24
mix_test :
25
- runs-on : macos-12
25
+ runs-on : macos-13
26
26
env :
27
27
TFLITE_BEAM_CORAL_SUPPORT : " true"
28
28
TFLITE_BEAM_PREFER_PRECOMPILED : " true"
29
29
OTP_VERSION : " 26.2.1"
30
30
ELIXIR_VERSION : " 1.16.0"
31
31
32
32
steps :
33
- - uses : actions/checkout@v4
33
+ - name : Checkout
34
+ uses : actions/checkout@v4
34
35
35
- - name : Cache OTP
36
- uses : actions/cache@v3
37
- id : cache-otp
38
- with :
39
- path : ./cache/otp
40
- key : ${{ runner.os }}-otp-${{ env.OTP_VERSION }}
41
-
42
- - name : Download OTP
43
- if : steps.cache-otp.outputs.cache-hit != 'true'
36
+ - name : Install OTP and Elixir
44
37
run : |
45
- mkdir -p ./cache/otp
46
- curl -fSL https://cocoa.build/otp/v${{ env.OTP_VERSION }}/otp-x86_64-apple-darwin.tar.gz -o ./cache/otp/otp-v${{ env.OTP_VERSION }}-x86_64-apple-darwin.tar.gz
47
- cd ./cache/otp
48
- tar -xzf otp-v${{ env.OTP_VERSION }}-x86_64-apple-darwin.tar.gz
49
-
50
- - name : Cache Elixir
51
- id : cache-elixir
52
- uses : actions/cache@v3
53
- with :
54
- path : ./cache/elixir
55
- key : ${{ runner.os }}-elixir-${{ env.ELIXIR_VERSION }}
38
+ curl -fsSO https://elixir-lang.org/install.sh
39
+ sh install.sh "elixir@${ELIXIR_VERSION}" "otp@${OTP_VERSION}"
56
40
57
- - name : Download and Compile Elixir
58
- if : steps.cache-elixir.outputs.cache-hit != 'true'
41
+ - name : Compile and Test
59
42
run : |
60
- export PATH=$(pwd)/./cache/otp/usr/local/bin:$(pwd)/./cache/elixir/elixir-${{ env.ELIXIR_VERSION }}/bin:${PATH}
61
- export ERL_ROOTDIR=$(pwd)/./cache/otp/usr/local/lib/erlang
62
- mkdir -p ./cache/elixir
63
- curl -fSL https://github.com/elixir-lang/elixir/archive/refs/tags/v${{ env.ELIXIR_VERSION }}.tar.gz -o ./cache/elixir/elixir-${{ env.ELIXIR_VERSION }}.tar.gz
64
- cd ./cache/elixir
65
- tar -xzf elixir-${{ env.ELIXIR_VERSION }}.tar.gz
66
- cd elixir-${{ env.ELIXIR_VERSION }}
67
- make -j$(sysctl -n hw.ncpu) install
43
+ export OTP_MAIN_VER="${OTP_VERSION%%.*}"
44
+ export PATH=$HOME/.elixir-install/installs/otp/${OTP_VERSION}/bin:$PATH
45
+ export PATH=$HOME/.elixir-install/installs/elixir/${ELIXIR_VERSION}-otp-${OTP_MAIN_VER}/bin:$PATH
68
46
69
- - name : Install Mix and Rebar
70
- run : |
71
- export PATH=$(pwd)/./cache/otp/usr/local/bin:$(pwd)/./cache/elixir/elixir-${{ env.ELIXIR_VERSION }}/bin:${PATH}
72
- export ERL_ROOTDIR=$(pwd)/./cache/otp/usr/local/lib/erlang
73
47
mix local.hex --force
74
48
mix local.rebar --force
75
49
76
- - name : Compile and Test
77
- run : |
78
- export PATH=$(pwd)/./cache/otp/usr/local/bin:$(pwd)/./cache/elixir/elixir-${{ env.ELIXIR_VERSION }}/bin:${PATH}
79
- export ERL_ROOTDIR=$(pwd)/./cache/otp/usr/local/lib/erlang
80
50
mix deps.get
81
51
mix test
0 commit comments