-
Notifications
You must be signed in to change notification settings - Fork 55
85 lines (81 loc) · 2.62 KB
/
ppx.yml
File metadata and controls
85 lines (81 loc) · 2.62 KB
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
77
78
79
80
81
82
83
84
85
name: PPX
on:
pull_request:
push:
branches:
- master
jobs:
ppx_linux:
name: PPX Linux
runs-on: ubuntu-latest
container:
image: debian:bullseye
steps:
- name: Install system dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
curl \
ca-certificates \
git \
unzip \
bubblewrap
- uses: actions/checkout@v4
- name: Set up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: "4.14"
dune-cache: true
cache-prefix: "v2-bullseye"
- name: Install dependencies
working-directory: packages/rescript-relay/rescript-relay-ppx
run: opam install . --deps-only
- name: Build PPX
working-directory: packages/rescript-relay/rescript-relay-ppx
run: |
opam exec -- dune build --profile release-static bin/RescriptRelayPpxApp.exe
cp _build/default/bin/RescriptRelayPpxApp.exe ppx-linux
- name: Strip binary
working-directory: packages/rescript-relay/rescript-relay-ppx
run: |
chmod +w ppx-linux
strip ppx-linux
- name: Upload PPX artifact
uses: actions/upload-artifact@v4
with:
name: ppx-linux
path: packages/rescript-relay/rescript-relay-ppx/ppx-*
if-no-files-found: error
ppx:
strategy:
matrix:
platform: [macos-latest, windows-latest]
name: PPX
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Set up OCaml
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: "4.14"
dune-cache: true
cache-prefix: "v1"
- name: Install dependencies
working-directory: packages/rescript-relay/rescript-relay-ppx
run: opam install . --deps-only
- name: Build PPX
working-directory: packages/rescript-relay/rescript-relay-ppx
run: opam exec -- dune build bin/RescriptRelayPpxApp.exe
- name: Strip PPX binary
if: runner.os != 'Windows'
working-directory: packages/rescript-relay/rescript-relay-ppx
run: |
chmod +w _build/default/bin/RescriptRelayPpxApp.exe
strip _build/default/bin/RescriptRelayPpxApp.exe
- name: Upload PPX artifact ${{ matrix.platform }}
uses: actions/upload-artifact@v4
with:
name: ppx-${{ matrix.platform }}
path: packages/rescript-relay/rescript-relay-ppx/_build/default/bin/RescriptRelayPpxApp.exe
if-no-files-found: error