-
Notifications
You must be signed in to change notification settings - Fork 2
103 lines (85 loc) · 2.89 KB
/
main.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Run regularly to test against upstream changes and prime the build cache
schedule:
- cron: 0 1 * * MON
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-2019
gmakeconfig:
- release
gmakeplatform:
- 64
ocamlversion:
- 4.14.x
runs-on: ${{ matrix.os }}
steps:
- name: Checkout ocaml-orx
uses: actions/checkout@v2
with:
path: ocaml-orx
- name: Checkout orx
uses: actions/checkout@v2
with:
repository: orx/orx
path: orx
- name: Update apt repo
run: sudo apt-get -qq update
if: matrix.os == 'ubuntu-latest'
- name: Install extra OS deps for orx
run: sudo apt-get -y install freeglut3-dev libxrandr-dev
if: matrix.os == 'ubuntu-latest'
- name: orx setup
working-directory: orx
run: ./setup.sh
if: matrix.os != 'windows-2019'
- name: orx setup
working-directory: orx
run: ./setup.bat
if: matrix.os == 'windows-2019'
- name: orx build (gmake)
working-directory: orx/code/build/linux/gmake
run: make config=${{ matrix.gmakeconfig }}${{ matrix.gmakeplatform }}
if: matrix.os == 'ubuntu-latest'
- name: orx build (gmake)
working-directory: orx/code/build/mac/gmake
run: make config=${{ matrix.gmakeconfig }}${{ matrix.gmakeplatform }}
if: matrix.os == 'macos-latest'
- name: orx build (gmake)
working-directory: orx/code/build/windows/gmake
run: make config=${{ matrix.gmakeconfig }}${{ matrix.gmakeplatform }}
if: matrix.os == 'windows-2019'
- name: Set ORX environment
run: echo "ORX=${{ github.workspace }}/orx/code" >> $GITHUB_ENV
if: matrix.os != 'windows-2019'
- name: Set ORX environment
run: echo "ORX=${{ github.workspace }}/orx/code" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
if: matrix.os == 'windows-2019'
- name: Setup OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocamlversion }}
opam-local-packages: ocaml-orx/*.opam
- name: Install opam dependencies
working-directory: ocaml-orx
run: opam install . --deps-only --with-test
- name: Build ocaml-orx
working-directory: ocaml-orx
run: opam exec -- dune build
env:
ORX: ${{ env.ORX }}