-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b4a57d
commit 30349c4
Showing
1 changed file
with
20 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,36 +5,42 @@ on: [push] | |
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
os: [windows-latest] | ||
include: | ||
- os: ubuntu-latest | ||
ocaml-compiler: "5.2.0" | ||
triplet: "x64-linux" | ||
- os: windows-latest | ||
ocaml-compiler: "5.2.0" | ||
triplet: "x64-mingw-static" | ||
- os: windows-latest | ||
ocaml-compiler: "arch-x86_64,system-mingw,ocaml.5.2.0" | ||
triplet: "x64-mingw-static" | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- run: git config --global core.autocrlf input | ||
- uses: actions/[email protected] | ||
- shell: bash | ||
run: rm -rf $(which pkg-config) | ||
|
||
- run: gcc --version | ||
- if: runner.os == 'Windows' | ||
run: | | ||
rm -rf $(which pkg-config) | ||
choco install pkgconfiglite | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
- run: gcc --version | ||
|
||
- 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 | ||
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} | ||
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.triplet }} | ||
with: | ||
runVcpkgInstall: true | ||
runVcpkgFormatString: '["install", "--clean-after-build"]' | ||
|
||
- run: vcpkg install | ||
|
||
- name: Set pkg-config path on Unix | ||
if: runner.os != 'Windows' | ||
run: | | ||
|
@@ -47,9 +53,6 @@ jobs: | |
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 | ||
|
@@ -61,27 +64,12 @@ jobs: | |
- uses: ocaml/setup-ocaml@v3 | ||
with: | ||
ocaml-compiler: "arch-x86_64,system-mingw,ocaml.5.2.0" | ||
ocaml-compiler: ${{ matrix.ocaml-compiler }} | ||
opam-disable-sandboxing: true | ||
dune-cache: false | ||
|
||
- run: opam exec -- opam install . --deps-only | ||
|
||
- name: Install deps & build | ||
run: 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 |