diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e39221ec84..f4292f34cd4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,13 +10,9 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true PLATFORM: windows64 - OPAMYES: 1 - OPAMROOT: D:\.opam - CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ ARCH: 64 MINGW_ARCH: x86_64 - CYGWIN_SETUP: https://cygwin.com/setup-x86_64.exe - CYG_ROOT: C:/cygwin64 + CYG_ROOT: D:\cygwin steps: - uses: actions/checkout@main with: @@ -27,12 +23,20 @@ jobs: echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append rm C:\msys64\usr\bin\bash.exe - - name: Cache opam - id: cache-opam - uses: actions/cache@v3.0.11 + - name: choco install nsis + uses: nick-invision/retry@v1 with: - path: D:\.opam - key: ${{ runner.os }}64-${{ hashFiles('./opam', './libs/') }} + timeout_minutes: 10 + max_attempts: 10 + command: choco install --no-progress nsis.portable --version 3.02 -y + + - name: choco install things + shell: pwsh + run: choco install --no-progress curl wget 7zip.portable -y + + - name: Prepend Chocolatey path + shell: pwsh + run: Write-Host "::add-path::C:\ProgramData\chocolatey\bin" - name: Install Neko from S3 shell: pwsh @@ -46,47 +50,33 @@ jobs: - name: Print Neko version run: neko -version 2>&1 - - name: choco install nsis - uses: nick-invision/retry@v1 + - name: Setup ocaml + uses: ocaml/setup-ocaml@v2 with: - timeout_minutes: 10 - max_attempts: 10 - command: choco install --no-progress nsis.portable --version 3.02 -y - - name: choco install things - shell: pwsh - run: choco install --no-progress curl wget 7zip.portable -y - - name: Prepend Chocolatey path - shell: pwsh - run: Write-Host "::add-path::C:\ProgramData\chocolatey\bin" + ocaml-compiler: 4.08.1 + opam-repositories: | + opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset + default: https://github.com/ocaml/opam-repository.git + opam-local-packages: | + haxe.opam - - name: Install OCaml + - name: Install dependencies shell: pwsh run: | Set-PSDebug -Trace 1 - curl.exe -fsSL -o cygwin-setup.exe --retry 3 $($env:CYGWIN_SETUP) - Start-Process -FilePath "cygwin-setup.exe" -ArgumentList "-B -q -R $($env:CYG_ROOT) -l C:/tmp -s $($env:CYG_MIRROR) -P default -P make -P git -P zlib-devel -P rsync -P patch -P diffutils -P curl -P unzip -P tar -P m4 -P perl -P libpcre2-devel -P mbedtls-devel -P mingw64-$($env:MINGW_ARCH)-zlib -P mingw64-$($env:MINGW_ARCH)-gcc-core -P mingw64-$($env:MINGW_ARCH)-pcre2" -Wait -RedirectStandardOutput cygwin-setup-out.txt - Get-Content cygwin-setup-out.txt - curl.exe -fsSL -o "opam.tar.xz" --retry 3 https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam$($env:ARCH).tar.xz curl.exe -fsSL -o "libmbedtls.tar.xz" --retry 3 https://github.com/Simn/mingw64-mbedtls/releases/download/2.16.3/mingw64-$($env:MINGW_ARCH)-mbedtls-2.16.3-1.tar.xz & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'curl -L https://cpanmin.us | perl - App::cpanminus') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm IPC::System::Simple module') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm String::ShellQuote') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'echo "$OLDPWD"') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -C / -xvf libmbedtls.tar.xz') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -xf opam.tar.xz') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && bash opam${ARCH}/install.sh') - name: Install OCaml libraries - if: steps.cache-opam.outputs.cache-hit != 'true' shell: pwsh run: | Set-PSDebug -Trace 1 - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam init mingw "https://github.com/fdopen/opam-repository-mingw.git#opam2" --comp 4.07.0+mingw${ARCH}c --switch 4.07.0+mingw${ARCH}c --auto-setup --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam update --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam pin add haxe . --kind=path --no-action --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam install haxe --deps-only --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam list') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'ocamlopt -v') + opam install haxe --deps-only + opam list - name: Expose mingw dll files shell: pwsh @@ -116,6 +106,13 @@ jobs: & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxelib.exe') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && ls ./out') + - name: Check artifact + shell: bash + run: | + ls out + # Output should contain binaries zip, installer zip and nupkg + [ $(ls -1 out | wc -l) -eq "3" ] + - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: @@ -128,13 +125,9 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true PLATFORM: windows - OPAMYES: 1 - OPAMROOT: D:\.opam - CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin-archive/20221123 ARCH: 32 MINGW_ARCH: i686 - CYGWIN_SETUP: https://cygwin.com/setup-x86.exe - CYG_ROOT: C:/cygwin + CYG_ROOT: D:\cygwin steps: - uses: actions/checkout@main with: @@ -145,12 +138,20 @@ jobs: echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append rm C:\msys64\usr\bin\bash.exe - - name: Cache opam - id: cache-opam - uses: actions/cache@v3.0.11 + - name: choco install nsis + uses: nick-invision/retry@v1 with: - path: D:\.opam - key: ${{ runner.os }}32-${{ hashFiles('./opam', './libs/') }} + timeout_minutes: 10 + max_attempts: 10 + command: choco install --no-progress nsis.portable --version 3.02 -y + + - name: choco install things + shell: pwsh + run: choco install --no-progress curl wget 7zip.portable -y + + - name: Prepend Chocolatey path + shell: pwsh + run: Write-Host "::add-path::C:\ProgramData\chocolatey\bin" - name: Install Neko from S3 shell: pwsh @@ -164,48 +165,52 @@ jobs: - name: Print Neko version run: neko -version 2>&1 - - name: choco install nsis - uses: nick-invision/retry@v1 + - name: Setup ocaml + id: ocaml + continue-on-error: true + uses: kLabz/setup-ocaml@win32 with: - timeout_minutes: 10 - max_attempts: 10 - command: choco install --no-progress nsis.portable --version 3.02 -y - - name: choco install things - shell: pwsh - run: choco install --no-progress curl wget 7zip.portable -y - - name: Prepend Chocolatey path - shell: pwsh - run: Write-Host "::add-path::C:\ProgramData\chocolatey\bin" + ocaml-compiler: 4.08.1 + opam-depext: false + opam-repositories: | + opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset + default: https://github.com/ocaml/opam-repository.git + opam-local-packages: | + haxe.opam + cache-prefix: w32-v1 + + # TODO make it work on first try + # (when cygwin cache doesn't exist, ocaml install fails with a curl error) + - name: Setup ocaml (second chance) + if: steps.ocaml.outcome == 'failure' + uses: kLabz/setup-ocaml@win32 + with: + ocaml-compiler: 4.08.1 + opam-depext: false + opam-repositories: | + opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset + default: https://github.com/ocaml/opam-repository.git + opam-local-packages: | + haxe.opam + cache-prefix: w32-v1 - - name: Install OCaml + - name: Install dependencies shell: pwsh run: | Set-PSDebug -Trace 1 - curl.exe -fsSL -o cygwin-setup.exe --retry 3 $($env:CYGWIN_SETUP) - Start-Process -FilePath "cygwin-setup.exe" -ArgumentList "-B -q -R $($env:CYG_ROOT) -l C:/tmp -s $($env:CYG_MIRROR) -P default -P make -P git -P zlib-devel -P rsync -P patch -P diffutils -P curl -P unzip -P tar -P m4 -P perl -P libpcre2-devel -P mbedtls-devel -P mingw64-$($env:MINGW_ARCH)-zlib -P mingw64-$($env:MINGW_ARCH)-gcc-core -P mingw64-$($env:MINGW_ARCH)-pcre2 --allow-unsupported-windows" -Wait -RedirectStandardOutput cygwin-setup-out.txt - Get-Content cygwin-setup-out.txt - & "$($env:CYG_ROOT)/bin/bash.exe" @('--norc', '--noprofile', '/etc/postinstall/ca-certificates.sh') - curl.exe -fsSL -o "opam.tar.xz" --retry 3 https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam$($env:ARCH).tar.xz curl.exe -fsSL -o "libmbedtls.tar.xz" --retry 3 https://github.com/Simn/mingw64-mbedtls/releases/download/2.16.3/mingw64-$($env:MINGW_ARCH)-mbedtls-2.16.3-1.tar.xz & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'curl -L https://cpanmin.us | perl - App::cpanminus') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm IPC::System::Simple module') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm String::ShellQuote') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'echo "$OLDPWD"') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -C / -xvf libmbedtls.tar.xz') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -xf opam.tar.xz') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && bash opam${ARCH}/install.sh') - name: Install OCaml libraries - if: steps.cache-opam.outputs.cache-hit != 'true' shell: pwsh run: | Set-PSDebug -Trace 1 - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam init mingw "https://github.com/fdopen/opam-repository-mingw.git#opam2" --comp 4.07.0+mingw${ARCH}c --switch 4.07.0+mingw${ARCH}c --auto-setup --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam update --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam pin add haxe . --kind=path --no-action --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam install haxe --deps-only --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam list') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'ocamlopt -v') + opam install haxe --deps-only + opam list - name: Expose mingw dll files shell: pwsh @@ -235,6 +240,13 @@ jobs: & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxelib.exe') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && ls ./out') + - name: Check artifact + shell: bash + run: | + ls out + # Output should contain binaries zip, installer zip and nupkg + [ $(ls -1 out | wc -l) -eq "3" ] + - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: @@ -257,7 +269,7 @@ jobs: uses: actions/cache@v3.0.11 with: path: ~/.opam/ - key: ${{ runner.os }}-${{ hashFiles('./opam', './libs/') }}-2 + key: ${{ runner.os }}-${{ hashFiles('./haxe.opam', './libs/') }}-2 - name: Install Neko from S3 run: | @@ -572,7 +584,7 @@ jobs: uses: actions/cache@v3.0.11 with: path: ~/.opam/ - key: ${{ runner.os }}-${{ hashFiles('./opam', './libs/') }}-2 + key: ${{ runner.os }}-${{ hashFiles('./haxe.opam', './libs/') }}-2 - name: Install Neko from S3 run: | @@ -625,14 +637,13 @@ jobs: make && make install cd .. - - name: Install OCaml libraries if: steps.cache-opam.outputs.cache-hit != 'true' run: | set -ex opam init # --disable-sandboxing opam update - opam switch create 4.07.1 + opam switch create 4.08.1 eval $(opam env) opam env opam pin add ctypes 0.17.1 --yes diff --git a/Earthfile b/Earthfile index 123f491b8f7..8f399bb103a 100644 --- a/Earthfile +++ b/Earthfile @@ -91,7 +91,7 @@ devcontainer: RUN git config --global codespaces-theme.hide-status 1 # Install OCaml libraries - COPY opam . + COPY haxe.opam . RUN opam init --disable-sandboxing RUN opam install . --yes --deps-only --no-depexts RUN opam list diff --git a/extra/github-actions/build-mac.yml b/extra/github-actions/build-mac.yml index 71f8d9f726f..b0287955209 100644 --- a/extra/github-actions/build-mac.yml +++ b/extra/github-actions/build-mac.yml @@ -32,14 +32,13 @@ make && make install cd .. - - name: Install OCaml libraries if: steps.cache-opam.outputs.cache-hit != 'true' run: | set -ex opam init # --disable-sandboxing opam update - opam switch create 4.07.1 + opam switch create 4.08.1 eval $(opam env) opam env opam pin add ctypes 0.17.1 --yes diff --git a/extra/github-actions/build-windows.yml b/extra/github-actions/build-windows.yml index 29b24567861..a4a6a3626f3 100644 --- a/extra/github-actions/build-windows.yml +++ b/extra/github-actions/build-windows.yml @@ -26,6 +26,13 @@ & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxelib.exe') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && ls ./out') +- name: Check artifact + shell: bash + run: | + ls out + # Output should contain binaries zip, installer zip and nupkg + [ $(ls -1 out | wc -l) -eq "3" ] + - name: Upload artifact uses: actions/upload-artifact@v1.0.0 with: diff --git a/extra/github-actions/cache-opam-windows.yml b/extra/github-actions/cache-opam-windows.yml new file mode 100644 index 00000000000..5270fbf1fed --- /dev/null +++ b/extra/github-actions/cache-opam-windows.yml @@ -0,0 +1,6 @@ +- name: Cache opam + id: cache-opam + uses: actions/cache@v3.0.11 + with: + path: D:\.opam + key: ${{ runner.os }}${{ env.ARCH }}-${{ hashFiles('./haxe.opam', './libs/') }} diff --git a/extra/github-actions/cache-opam.yml b/extra/github-actions/cache-opam.yml index ee27a7a12c8..faaee00b723 100644 --- a/extra/github-actions/cache-opam.yml +++ b/extra/github-actions/cache-opam.yml @@ -3,4 +3,4 @@ uses: actions/cache@v3.0.11 with: path: ~/.opam/ - key: ${{ runner.os }}-${{ hashFiles('./opam', './libs/') }}-2 + key: ${{ runner.os }}-${{ hashFiles('./haxe.opam', './libs/') }}-2 diff --git a/extra/github-actions/install-nsis.yml b/extra/github-actions/install-nsis.yml index 33ce6f1db18..13d67d0241e 100644 --- a/extra/github-actions/install-nsis.yml +++ b/extra/github-actions/install-nsis.yml @@ -4,9 +4,11 @@ timeout_minutes: 10 max_attempts: 10 command: choco install --no-progress nsis.portable --version 3.02 -y + - name: choco install things shell: pwsh run: choco install --no-progress curl wget 7zip.portable -y + - name: Prepend Chocolatey path shell: pwsh run: Write-Host "::add-path::C:\ProgramData\chocolatey\bin" diff --git a/extra/github-actions/install-ocaml-libs-windows.yml b/extra/github-actions/install-ocaml-libs-windows.yml index e0abf154eb1..9a24a4b33ee 100644 --- a/extra/github-actions/install-ocaml-libs-windows.yml +++ b/extra/github-actions/install-ocaml-libs-windows.yml @@ -1,11 +1,6 @@ - name: Install OCaml libraries - if: steps.cache-opam.outputs.cache-hit != 'true' shell: pwsh run: | Set-PSDebug -Trace 1 - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam init mingw "https://github.com/fdopen/opam-repository-mingw.git#opam2" --comp 4.07.0+mingw${ARCH}c --switch 4.07.0+mingw${ARCH}c --auto-setup --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam update --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam pin add haxe . --kind=path --no-action --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam install haxe --deps-only --yes 2>&1') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam list') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'ocamlopt -v') + opam install haxe --deps-only + opam list diff --git a/extra/github-actions/install-ocaml-windows.yml b/extra/github-actions/install-ocaml-windows.yml index 3a0d18c32ac..6902f4eef3b 100644 --- a/extra/github-actions/install-ocaml-windows.yml +++ b/extra/github-actions/install-ocaml-windows.yml @@ -1,17 +1,39 @@ -- name: Install OCaml +- name: Setup ocaml + id: ocaml + continue-on-error: true + uses: kLabz/setup-ocaml@win32 + with: + ocaml-compiler: 4.08.1 + opam-depext: false + opam-repositories: | + opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset + default: https://github.com/ocaml/opam-repository.git + opam-local-packages: | + haxe.opam + cache-prefix: w32-v1 + +# TODO make it work on first try +# (when cygwin cache doesn't exist, ocaml install fails with a curl error) +- name: Setup ocaml (second chance) + if: steps.ocaml.outcome == 'failure' + uses: kLabz/setup-ocaml@win32 + with: + ocaml-compiler: 4.08.1 + opam-depext: false + opam-repositories: | + opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset + default: https://github.com/ocaml/opam-repository.git + opam-local-packages: | + haxe.opam + cache-prefix: w32-v1 + +- name: Install dependencies shell: pwsh run: | Set-PSDebug -Trace 1 - curl.exe -fsSL -o cygwin-setup.exe --retry 3 $($env:CYGWIN_SETUP) - Start-Process -FilePath "cygwin-setup.exe" -ArgumentList "-B -q -R $($env:CYG_ROOT) -l C:/tmp -s $($env:CYG_MIRROR) -P default -P make -P git -P zlib-devel -P rsync -P patch -P diffutils -P curl -P unzip -P tar -P m4 -P perl -P libpcre2-devel -P mbedtls-devel -P mingw64-$($env:MINGW_ARCH)-zlib -P mingw64-$($env:MINGW_ARCH)-gcc-core -P mingw64-$($env:MINGW_ARCH)-pcre2 --allow-unsupported-windows" -Wait -RedirectStandardOutput cygwin-setup-out.txt - Get-Content cygwin-setup-out.txt - & "$($env:CYG_ROOT)/bin/bash.exe" @('--norc', '--noprofile', '/etc/postinstall/ca-certificates.sh') - curl.exe -fsSL -o "opam.tar.xz" --retry 3 https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam$($env:ARCH).tar.xz curl.exe -fsSL -o "libmbedtls.tar.xz" --retry 3 https://github.com/Simn/mingw64-mbedtls/releases/download/2.16.3/mingw64-$($env:MINGW_ARCH)-mbedtls-2.16.3-1.tar.xz & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'curl -L https://cpanmin.us | perl - App::cpanminus') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm IPC::System::Simple module') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm String::ShellQuote') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'echo "$OLDPWD"') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -C / -xvf libmbedtls.tar.xz') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -xf opam.tar.xz') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && bash opam${ARCH}/install.sh') diff --git a/extra/github-actions/install-ocaml-windows64.yml b/extra/github-actions/install-ocaml-windows64.yml index 1f4a087fc08..ccf6cdfb2a9 100644 --- a/extra/github-actions/install-ocaml-windows64.yml +++ b/extra/github-actions/install-ocaml-windows64.yml @@ -1,16 +1,20 @@ -- name: Install OCaml +- name: Setup ocaml + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: 4.08.1 + opam-repositories: | + opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset + default: https://github.com/ocaml/opam-repository.git + opam-local-packages: | + haxe.opam + +- name: Install dependencies shell: pwsh run: | Set-PSDebug -Trace 1 - curl.exe -fsSL -o cygwin-setup.exe --retry 3 $($env:CYGWIN_SETUP) - Start-Process -FilePath "cygwin-setup.exe" -ArgumentList "-B -q -R $($env:CYG_ROOT) -l C:/tmp -s $($env:CYG_MIRROR) -P default -P make -P git -P zlib-devel -P rsync -P patch -P diffutils -P curl -P unzip -P tar -P m4 -P perl -P libpcre2-devel -P mbedtls-devel -P mingw64-$($env:MINGW_ARCH)-zlib -P mingw64-$($env:MINGW_ARCH)-gcc-core -P mingw64-$($env:MINGW_ARCH)-pcre2" -Wait -RedirectStandardOutput cygwin-setup-out.txt - Get-Content cygwin-setup-out.txt - curl.exe -fsSL -o "opam.tar.xz" --retry 3 https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam$($env:ARCH).tar.xz curl.exe -fsSL -o "libmbedtls.tar.xz" --retry 3 https://github.com/Simn/mingw64-mbedtls/releases/download/2.16.3/mingw64-$($env:MINGW_ARCH)-mbedtls-2.16.3-1.tar.xz & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'curl -L https://cpanmin.us | perl - App::cpanminus') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm IPC::System::Simple module') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cpanm String::ShellQuote') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'echo "$OLDPWD"') & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -C / -xvf libmbedtls.tar.xz') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -xf opam.tar.xz') - & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && bash opam${ARCH}/install.sh') diff --git a/extra/github-actions/workflows/main.yml b/extra/github-actions/workflows/main.yml index c860a56db09..8b14f97de65 100644 --- a/extra/github-actions/workflows/main.yml +++ b/extra/github-actions/workflows/main.yml @@ -9,13 +9,9 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true PLATFORM: windows64 - OPAMYES: 1 - OPAMROOT: D:\.opam - CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/ ARCH: 64 MINGW_ARCH: x86_64 - CYGWIN_SETUP: https://cygwin.com/setup-x86_64.exe - CYG_ROOT: C:/cygwin64 + CYG_ROOT: D:\cygwin steps: - uses: actions/checkout@main with: @@ -26,15 +22,8 @@ jobs: echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append rm C:\msys64\usr\bin\bash.exe - - name: Cache opam - id: cache-opam - uses: actions/cache@v3.0.11 - with: - path: D:\.opam - key: ${{ runner.os }}64-${{ hashFiles('./opam', './libs/') }} - - @import install-neko-windows.yml @import install-nsis.yml + @import install-neko-windows.yml @import install-ocaml-windows64.yml @import install-ocaml-libs-windows.yml @import build-windows.yml @@ -44,13 +33,9 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true PLATFORM: windows - OPAMYES: 1 - OPAMROOT: D:\.opam - CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin-archive/20221123 ARCH: 32 MINGW_ARCH: i686 - CYGWIN_SETUP: https://cygwin.com/setup-x86.exe - CYG_ROOT: C:/cygwin + CYG_ROOT: D:\cygwin steps: - uses: actions/checkout@main with: @@ -61,15 +46,8 @@ jobs: echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append rm C:\msys64\usr\bin\bash.exe - - name: Cache opam - id: cache-opam - uses: actions/cache@v3.0.11 - with: - path: D:\.opam - key: ${{ runner.os }}32-${{ hashFiles('./opam', './libs/') }} - - @import install-neko-windows.yml @import install-nsis.yml + @import install-neko-windows.yml @import install-ocaml-windows.yml @import install-ocaml-libs-windows.yml @import build-windows.yml diff --git a/opam b/haxe.opam similarity index 97% rename from opam rename to haxe.opam index 2304be278e2..e9f4edfe681 100644 --- a/opam +++ b/haxe.opam @@ -19,7 +19,7 @@ build: [ install: [make "install" "INSTALL_DIR=%{prefix}%"] remove: [make "uninstall" "INSTALL_DIR=%{prefix}%"] depends: [ - "ocaml" {>= "4.02"} + "ocaml" {>= "4.08"} "ocamlfind" {build} "dune" {>= "1.11"} "camlp5" {build & = "8.00"} diff --git a/src/macro/eval/evalLuv.ml b/src/macro/eval/evalLuv.ml index 990d7923906..a399d910859 100644 --- a/src/macro/eval/evalLuv.ml +++ b/src/macro/eval/evalLuv.ml @@ -2389,8 +2389,8 @@ let passwd_fields = [ encode_result (fun (p:Passwd.t) -> encode_obj_s [ "username",encode_string p.username; - "uid",vint p.uid; - "gid",vint p.gid; + "uid",vint (Unsigned.ULong.to_int p.uid); + "gid",vint (Unsigned.ULong.to_int p.gid); "shell",encode_nullable encode_string p.shell; "homedir",vnative_string p.homedir; ]