chore: Try to build on gh actions #549
Workflow file for this run
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
name: Build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/[email protected] | |
- 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 | |
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 | |
if: runner.os == 'Windows' | |
shell: bash | |
run: | | |
echo "PKG_CONFIG_PATH=${GITHUB_WORKSPACE}\vcpkg_installed\\${VCPKG_DEFAULT_TRIPLET}\lib\pkgconfig" >> $GITHUB_ENV | |
- shell: cmd | |
run: tree D:\a\odiff\odiff\vcpkg_installed\x64-windows | |
- shell: bash | |
run: pkg-config --libs --cflags libspng libtiff-4 libturbojpeg | |
- name: Set-up OCaml | |
uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: 4.14.0 | |
dune-cache: true | |
- name: Install deps & build | |
run: opam install . --with-test | |
- run: opam exec -- dune build | |
- 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 |