X #637
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: | |
- run: git config --global core.autocrlf input | |
- uses: actions/checkout@v2.3.2 | |
- uses: cygwin/cygwin-install-action@master | |
- shell: bash | |
run: rm -rf $(which pkg-config) | |
- 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 | |
# - run: git config --global core.autocrlf input | |
# - uses: cygwin/cygwin-install-action@master | |
- 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 | |
# curl -L -o opam64.tar.xz https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam64.tar.xz | |
# tar -xf opam64.tar.xz | |
# bash opam64/install.sh | |
- uses: ocaml/setup-ocaml@v3 | |
with: | |
ocaml-compiler: "4.14.2" | |
opam-disable-sandboxing: true | |
dune-cache: false | |
# opam-repositories: | | |
# default: git+https://github.com/fdopen/opam-repository-mingw.git#opam2 | |
- run: | | |
opam switch create 4.14.2-mingw64 arch-x86_64 system-mingw ocaml.4.14.2 | |
- name: Install deps & build | |
run: | | |
opam switch 4.14.2-mingw64 | |
opam install . --with-test | |
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 |