diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ff161d4..7b303b32 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,9 +16,8 @@ jobs: - uses: actions/checkout@v2.3.2 - shell: bash run: rm -rf $(which pkg-config) - - uses: cygwin/cygwin-install-action@master - with: - packages: pkg-config + + - run: gcc --version - uses: actions/setup-node@v4 with: @@ -46,42 +45,28 @@ jobs: 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: PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/vcpkg_installed/${VCPKG_DEFAULT_TRIPLET}/lib/pkgconfig pkg-config --cflags --libs libspngstatic - - # - run: git config --global core.autocrlf input - # - uses: cygwin/cygwin-install-action@master - - # - shell: bash - # run: | - # echo "LIBPNG_CFLAGS=lol" >> $GITHUB_ENV - # echo "LIBPNG_LIBS=lol" >> $GITHUB_ENV - # echo "LIBTIFF_LIBS=lol" >> $GITHUB_ENV - # echo "LIBTIFF_CFLAGS=lol" >> $GITHUB_ENV - # echo "LIBJPEG_CFLAGS=lol" >> $GITHUB_ENV - # echo "LIBJPEG_LIBS=lol" >> $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 + 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: "5.2.0" + ocaml-compiler: "arch-x86_64 system-mingw ocaml.5.2.0" opam-disable-sandboxing: true dune-cache: false - # opam-repositories: | - # default: git+https://github.com/fdopen/opam-repository-mingw.git#opam2 - - - run: opam switch create 5.2.0-mingw64 arch-x86_64 system-mingw ocaml.5.2.0 - name: Install deps & build run: | - opam switch 5.2.0-mingw64 - opam install . --with-test opam exec -- dune build --verbose - run: opam exec -- dune build --verbose