6
6
workflow_dispatch :
7
7
8
8
jobs :
9
-
10
9
create-release :
11
10
runs-on : ubuntu-latest
12
11
outputs :
@@ -21,47 +20,46 @@ jobs:
21
20
tag_name : ${{ github.run_number }}
22
21
release_name : Release ${{ github.run_number }}
23
22
24
-
25
23
macos-build :
26
24
runs-on : macos-latest
27
25
needs : create-release
28
26
29
27
steps :
30
- - uses : actions/checkout@v2
28
+ - uses : actions/checkout@v2
31
29
32
- - name : Opam modules cache
33
- uses : actions/cache@v1
34
- env :
30
+ - name : Opam modules cache
31
+ uses : actions/cache@v1
32
+ env :
35
33
cache-name : cache-opam-modules
36
- with :
34
+ with :
37
35
path : ~/.opam
38
36
key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('mlang.opam', 'Makefile') }}
39
37
restore-keys : |
40
38
${{ runner.os }}-build-${{ env.cache-name }}-
41
39
${{ runner.os }}-build-
42
40
${{ runner.os }}-
43
41
44
- - name : Set up OCaml
45
- uses : ocaml/setup-ocaml@v2
46
- with :
42
+ - name : Set up OCaml
43
+ uses : ocaml/setup-ocaml@v2
44
+ with :
47
45
ocaml-compiler : 4.11.2
48
46
49
- - name : Install dependencies
50
- run : |
51
- brew install gmp mpfr
52
- opam update
53
- make init-without-switch
47
+ - name : Install dependencies
48
+ run : |
49
+ brew install gmp mpfr
50
+ opam update
51
+ make init-without-switch
54
52
55
- - name : Make mlang binary
56
- run : |
53
+ - name : Make mlang binary
54
+ run : |
57
55
eval $(opam env)
58
56
make build
59
57
60
- - name : Upload release asset
61
- uses : actions/upload-release-asset@v1
62
- env :
58
+ - name : Upload release asset
59
+ uses : actions/upload-release-asset@v1
60
+ env :
63
61
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64
- with :
62
+ with :
65
63
upload_url : ${{ needs.create-release.outputs.upload_url }}
66
64
asset_path : ./_build/default/src/main.exe
67
65
asset_name : mlang-macos-v${{ github.run_number }}.exe
@@ -101,16 +99,10 @@ jobs:
101
99
- name : Install dependencies
102
100
run : |
103
101
sudo apt update
104
- sudo apt install m4 perl python3 clang git build-essential lzip
105
- # We pull GMP and MPFR from their sources and build them with MUSL
106
- # in order to get a static.
107
- wget https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.lz && tar xaf gmp-6.2.1.tar.lz
108
- ( cd gmp-6.2.1; CC=musl-gcc ./configure --prefix /tmp/gmp-prefix && make && make install )
109
- wget https://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz && tar xaf mpfr-4.1.0.tar.xz
110
- ( cd mpfr-4.1.0; CC=musl-gcc ./configure --prefix /tmp/gmp-prefix -with-gmp=/tmp/gmp-prefix && make && make install )
102
+ sudo apt install m4 perl python3 clang git build-essential lzip libgmp-dev libmpfr-dev
111
103
eval $(opam env)
112
104
opam update
113
- CPPFLAGS=-I/tmp/gmp-prefix/include LDFLAGS=-L/tmp/gmp-prefix/lib make init-without-switch
105
+ make init-without-switch
114
106
115
107
- name : Make mlang binary
116
108
run : |
0 commit comments