|
@@ -18,11 +18,6 @@ jobs:
|
|
|
with:
|
|
with:
|
|
|
submodules: recursive
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- - name: Use GNU Tar from msys
|
|
|
|
|
- run: |
|
|
|
|
|
- echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
|
|
|
- rm C:\msys64\usr\bin\bash.exe
|
|
|
|
|
-
|
|
|
|
|
- name: choco install nsis
|
|
- name: choco install nsis
|
|
|
uses: nick-invision/retry@v3
|
|
uses: nick-invision/retry@v3
|
|
|
with:
|
|
with:
|
|
@@ -51,44 +46,30 @@ jobs:
|
|
|
run: neko -version 2>&1
|
|
run: neko -version 2>&1
|
|
|
|
|
|
|
|
- name: Setup ocaml
|
|
- name: Setup ocaml
|
|
|
- uses: ocaml/setup-ocaml@v2
|
|
|
|
|
|
|
+ uses: ocaml/setup-ocaml@v3
|
|
|
with:
|
|
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
|
|
|
|
|
|
|
+ ocaml-compiler: 4
|
|
|
opam-local-packages: |
|
|
opam-local-packages: |
|
|
|
haxe.opam
|
|
haxe.opam
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
- name: Install dependencies
|
|
|
shell: pwsh
|
|
shell: pwsh
|
|
|
|
|
+ env:
|
|
|
|
|
+ MBEDTLS_VERSION: 2.16.3
|
|
|
run: |
|
|
run: |
|
|
|
- Set-PSDebug -Trace 1
|
|
|
|
|
- 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')
|
|
|
|
|
|
|
+ curl.exe -fsSL -o "libmbedtls.tar.xz" --retry 3 `
|
|
|
|
|
+ https://github.com/Simn/mingw64-mbedtls/releases/download/${{ env.MBEDTLS_VERSION }}/mingw64-${{ env.MINGW_ARCH }}-mbedtls-${{ env.MBEDTLS_VERSION }}-1.tar.xz
|
|
|
|
|
+ ${{ env.CYG_ROOT }}\bin\tar.exe -C ${{ env.CYG_ROOT }} -xvf libmbedtls.tar.xz
|
|
|
|
|
|
|
|
- name: Install OCaml libraries
|
|
- name: Install OCaml libraries
|
|
|
shell: pwsh
|
|
shell: pwsh
|
|
|
run: |
|
|
run: |
|
|
|
Set-PSDebug -Trace 1
|
|
Set-PSDebug -Trace 1
|
|
|
|
|
+ # see: https://github.com/aantron/luv/issues/162
|
|
|
|
|
+ $env:PATH="${env:CYG_ROOT}\bin;${env:CYG_ROOT}\usr\x86_64-w64-mingw32\bin;${env:PATH}"
|
|
|
opam install haxe --deps-only
|
|
opam install haxe --deps-only
|
|
|
opam list
|
|
opam list
|
|
|
|
|
|
|
|
- - name: Expose mingw dll files
|
|
|
|
|
- shell: pwsh
|
|
|
|
|
- run: Write-Host "::add-path::${env:CYG_ROOT}/usr/$($env:MINGW_ARCH)-w64-mingw32/sys-root/mingw/bin"
|
|
|
|
|
-
|
|
|
|
|
- # required to be able to retrieve the revision
|
|
|
|
|
- - name: Mark directory as safe
|
|
|
|
|
- shell: pwsh
|
|
|
|
|
- run: |
|
|
|
|
|
- Set-PSDebug -Trace 1
|
|
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'git config --global --add safe.directory "$OLDPWD"')
|
|
|
|
|
-
|
|
|
|
|
- name: Set ADD_REVISION=1 for non-release
|
|
- name: Set ADD_REVISION=1 for non-release
|
|
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
|
shell: pwsh
|
|
shell: pwsh
|
|
@@ -98,20 +79,15 @@ jobs:
|
|
|
shell: pwsh
|
|
shell: pwsh
|
|
|
run: |
|
|
run: |
|
|
|
Set-PSDebug -Trace 1
|
|
Set-PSDebug -Trace 1
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win -j`nproc` haxe 2>&1')
|
|
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win haxelib 2>&1')
|
|
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -f Makefile.win echo_package_files package_bin package_installer_win package_choco 2>&1')
|
|
|
|
|
- dir out
|
|
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxe.exe')
|
|
|
|
|
- & "$($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" ]
|
|
|
|
|
|
|
+ # stop after any command returns an error
|
|
|
|
|
+ $PSNativeCommandUseErrorActionPreference = $true
|
|
|
|
|
+ $ErrorActionPreference = 'Stop'
|
|
|
|
|
+ opam exec -- make -s -f Makefile.win -j"$env:NUMBER_OF_PROCESSORS" haxe
|
|
|
|
|
+ opam exec -- make -s -f Makefile.win haxelib
|
|
|
|
|
+ opam exec -- make -f Makefile.win echo_package_files package_bin package_installer_win package_choco
|
|
|
|
|
+ cygcheck ./haxe.exe
|
|
|
|
|
+ cygcheck ./haxelib.exe
|
|
|
|
|
+ ls ./out
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
- name: Upload artifact
|
|
|
uses: actions/upload-artifact@v4
|
|
uses: actions/upload-artifact@v4
|