Skip to content

Commit

Permalink
X
Browse files Browse the repository at this point in the history
  • Loading branch information
dmtrKovalenko committed Aug 22, 2024
1 parent 0b4a57d commit 30349c4
Showing 1 changed file with 20 additions and 32 deletions.
52 changes: 20 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand All @@ -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

0 comments on commit 30349c4

Please sign in to comment.