-
-
Notifications
You must be signed in to change notification settings - Fork 77
88 lines (71 loc) · 2.58 KB
/
build.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
name: Build
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
defaults:
run:
shell: bash
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v2.3.2
- shell: bash
run: rm -rf $(which pkg-config)
- run: gcc --version
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: lukka/get-cmake@latest
- name: Setup anew (or from cache) vcpkg (and does not build any package)
uses: lukka/run-vcpkg@v11
env:
VCPKG_DEFAULT_TRIPLET: x64-mingw-static
VCPKG_DEFAULT_HOST_TRIPLET: x64-mingw-static
with:
runVcpkgInstall: true
runVcpkgFormatString: '["install", "--clean-after-build"]'
- run: vcpkg install
- name: Set pkg-config path on Unix
if: runner.os != 'Windows'
run: |
ls "${GITHUB_WORKSPACE}/vcpkg_installed/${VCPKG_DEFAULT_TRIPLET}/lib/pkgconfig"
echo "PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/vcpkg_installed/${VCPKG_DEFAULT_TRIPLET}/lib/pkgconfig" >> $GITHUB_ENV
- name: Set pkg-config path on Unix
shell: bash
if: runner.os == 'Windows'
run: |
echo "PKG_CONFIG_PATH=${GITHUB_WORKSPACE}\vcpkg_installed\\${VCPKG_DEFAULT_TRIPLET}\lib\pkgconfig" >> $GITHUB_ENV
- run: |
choco install pkgconfiglite
- shell: bash
run: |
echo "LIBPNG_CFLAGS=$(pkg-config --cflags libspng_static)" >> $GITHUB_ENV
echo "LIBPNG_LIBS=$(pkg-config --libs libspng_static)" >> $GITHUB_ENV
echo "LIBTIFF_LIBS=$(pkg-config --libs libtiff-4)" >> $GITHUB_ENV
echo "LIBTIFF_CFLAGS=$(pkg-config --cflags libtiff-4)" >> $GITHUB_ENV
echo "LIBJPEG_CFLAGS=$(pkg-config --cflags libturbojpeg)" >> $GITHUB_ENV
echo "LIBJPEG_LIBS=$(pkg-config --libs libturbojpeg)" >> $GITHUB_ENV
- uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: "arch-x86_64,system-mingw,ocaml.5.2.0"
opam-disable-sandboxing: true
dune-cache: false
- name: Install deps & build
run: |
opam install . --deps-only
opam exec -- dune build --verbose
- run: opam exec -- dune build --verbose
- name: Test
run: esy test
- name: Test node bindings
run: esy test-js
- name: Test ts declaration
run: esy test-ts
- uses: actions/upload-artifact@v2
if: failure()
with:
name: orange_diff_generated
path: test/test-images