use only ocaml 5 #105
This file contains hidden or 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
| # DO NOT EDIT. Generated from /extra/github-actions | ||
| name: CI | ||
| on: [push, pull_request] | ||
| jobs: | ||
| cancel: | ||
| name: Cancel previous runs | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 3 | ||
| steps: | ||
| - uses: styfle/cancel-workflow-action@0.9.0 | ||
| with: | ||
| all_but_latest: true | ||
| access_token: ${{ github.token }} | ||
| packaging: | ||
| name: Prepare package | ||
| runs-on: ubuntu-latest | ||
| needs: [cancel] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: krdlab/setup-haxe@v1 | ||
| with: | ||
| haxe-version: 4.2.3 | ||
| - name: Generate README | ||
| run: | | ||
| haxe --cwd extra/readme build-haxelib.hxml | ||
| - name: Generate CHANGELOG | ||
| if: ${{ github.event.release != null && github.event.release.body != '' }} | ||
| env: | ||
| CHANGELOG: ${{ github.event.release.body }} | ||
| run: | | ||
| echo "$CHANGELOG" > CHANGELOG.md | ||
| - name: Upload Ecso | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ecso | ||
| path: | | ||
| */ecso/*.hx | ||
| */ecso/_core/*.hx | ||
| README.md | ||
| LICENSE.md | ||
| CHANGELOG.md | ||
| extraParams.hxml | ||
| haxelib.json | ||
| if-no-files-found: error | ||
| windows64-build-4-3-7: | ||
| name: Haxe 4.3.7 / windows64-build | ||
| runs-on: windows-latest | ||
| env: | ||
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
| PLATFORM: windows64 | ||
| ARCH: 64 | ||
| MINGW_ARCH: x86_64 | ||
| CYG_ROOT: D:\cygwin | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| repository: 'HaxeFoundation/haxe' | ||
| submodules: recursive | ||
| ref: 'e0b355c6be312c1b17382603f018cf52522ec651' | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| path: 'plugins/ecso' | ||
| - 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 | ||
| uses: nick-invision/retry@v3 | ||
| with: | ||
| timeout_minutes: 10 | ||
| max_attempts: 10 | ||
| command: choco install --no-progress nsis.portable --version 3.09 -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 | ||
| run: | | ||
| Invoke-WebRequest https://build.haxe.org/builds/neko/windows64/neko_latest.zip -OutFile $env:RUNNER_TEMP/neko_latest.zip | ||
| Expand-Archive $env:RUNNER_TEMP/neko_latest.zip -DestinationPath $env:RUNNER_TEMP | ||
| $NEKOPATH = Get-ChildItem $env:RUNNER_TEMP/neko-*-* | ||
| echo "$NEKOPATH" >> $env:GITHUB_PATH | ||
| echo "NEKOPATH=$NEKOPATH" >> $env:GITHUB_ENV | ||
| - name: Print Neko version | ||
| run: neko -version 2>&1 | ||
| - name: Setup ocaml | ||
| uses: ocaml/setup-ocaml@3d85bf33a66e089149cd1e9c75da7b9cb6d9d3a7 | ||
| with: | ||
| ocaml-compiler: 4.14.0 | ||
| opam-local-packages: | | ||
| haxe.opam | ||
| - name: Install dependencies | ||
| shell: pwsh | ||
| 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') | ||
| - name: Install OCaml libraries | ||
| shell: pwsh | ||
| run: | | ||
| Set-PSDebug -Trace 1 | ||
| opam install haxe --deps-only | ||
| 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 | ||
| if: ${{ !false }} | ||
| shell: pwsh | ||
| run: echo "ADD_REVISION=1" >> $Env:GITHUB_ENV | ||
| - name: Build Haxe + Ecso | ||
| shell: pwsh | ||
| run: | | ||
| Set-PSDebug -Trace 1 | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'git config --global --add safe.directory $OLDPWD 2>&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 -s -f Makefile.win -j`nproc` PLUGIN=ecso plugin 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" && mkdir ./plugins/ecso/cmxs/hx-4.3.7') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && mv -T ./plugins/ecso/cmxs/Windows ./plugins/ecso/cmxs/hx-4.3.7/Windows${ARCH}') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./plugins/ecso/cmxs/hx-4.3.7/Windows${ARCH}/plugin.cmxs') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && ls ./out') | ||
| - name: Check artifact | ||
| shell: bash | ||
| run: | | ||
| mkdir ./plugins/ecso/cmxs/hx-4.3.7 | ||
| mv -T ./plugins/ecso/cmxs/Windows ./plugins/ecso/cmxs/hx-4.3.7/Windows${ARCH} | ||
| cygcheck ./plugins/ecso/cmxs/hx-4.3.7/Windows${ARCH}/plugin.cmxs | ||
| ls out | ||
| # Output should contain binaries zip, installer zip and nupkg | ||
| [ $(ls -1 out | wc -l) -eq "3" ] | ||
| - name: Upload Ecso | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ecso | ||
| path: plugins/ecso/**/*.cmxs | ||
| if-no-files-found: error | ||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: win${{env.ARCH}}Binaries | ||
| retention-days: 1 | ||
| path: out | ||
| windows-build-4-3-7: | ||
| name: Haxe 4.3.7 / windows-build | ||
| runs-on: windows-latest | ||
| continue-on-error: true | ||
| env: | ||
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
| PLATFORM: windows | ||
| ARCH: 32 | ||
| MINGW_ARCH: i686 | ||
| CYG_ROOT: D:\cygwin | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| repository: 'HaxeFoundation/haxe' | ||
| submodules: recursive | ||
| ref: 'e0b355c6be312c1b17382603f018cf52522ec651' | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| path: 'plugins/ecso' | ||
| - 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 | ||
| uses: nick-invision/retry@v3 | ||
| with: | ||
| timeout_minutes: 10 | ||
| max_attempts: 10 | ||
| command: choco install --no-progress nsis.portable --version 3.09 -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 | ||
| run: | | ||
| Invoke-WebRequest https://build.haxe.org/builds/neko/windows/neko_latest.zip -OutFile $env:RUNNER_TEMP/neko_latest.zip | ||
| Expand-Archive $env:RUNNER_TEMP/neko_latest.zip -DestinationPath $env:RUNNER_TEMP | ||
| $NEKOPATH = Get-ChildItem $env:RUNNER_TEMP/neko-*-* | ||
| echo "$NEKOPATH" >> $env:GITHUB_PATH | ||
| echo "NEKOPATH=$NEKOPATH" >> $env:GITHUB_ENV | ||
| - name: Print Neko version | ||
| run: neko -version 2>&1 | ||
| - name: Setup ocaml | ||
| id: ocaml | ||
| continue-on-error: true | ||
| uses: klabz/setup-ocaml@win32-2025-2 | ||
| with: | ||
| ocaml-compiler: 4.14.0 | ||
| opam-local-packages: | | ||
| haxe.opam | ||
| # 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-2025-2 | ||
| with: | ||
| ocaml-compiler: 4.14.0 | ||
| opam-local-packages: | | ||
| haxe.opam | ||
| - name: Install dependencies | ||
| shell: pwsh | ||
| 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') | ||
| - name: Install OCaml libraries | ||
| shell: pwsh | ||
| run: | | ||
| Set-PSDebug -Trace 1 | ||
| opam install ocaml-env-mingw32 | ||
| opam install conf-mingw-w64-pcre2-i686 | ||
| opam install haxe --deps-only | ||
| opam list | ||
| - name: Check mingw dll files | ||
| shell: bash | ||
| run: | | ||
| ls "$CYG_ROOT/usr/" | ||
| echo "bin/" | ||
| ls "$CYG_ROOT/usr/i686-w64-mingw32/sys-root/mingw/bin/" | ||
| - 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 | ||
| if: ${{ !false }} | ||
| shell: pwsh | ||
| run: echo "ADD_REVISION=1" >> $Env:GITHUB_ENV | ||
| - name: Build Haxe + Ecso | ||
| shell: pwsh | ||
| run: | | ||
| Set-PSDebug -Trace 1 | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'git config --global --add safe.directory $OLDPWD 2>&1') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win32 -j`nproc` haxe 2>&1') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win32 haxelib 2>&1') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win32 -j`nproc` PLUGIN=ecso plugin 2>&1') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && file ./haxe.exe') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -f Makefile.win32 echo_package_files package_bin package_installer_win package_choco 2>&1') | ||
| & "$($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" && mkdir ./plugins/ecso/cmxs/hx-4.3.7') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && mv -T ./plugins/ecso/cmxs/Windows ./plugins/ecso/cmxs/hx-4.3.7/Windows${ARCH}') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./plugins/ecso/cmxs/hx-4.3.7/Windows${ARCH}/plugin.cmxs') | ||
| & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && ls ./out') | ||
| - name: Check artifact | ||
| shell: bash | ||
| run: | | ||
| mkdir ./plugins/ecso/cmxs/hx-4.3.7 | ||
| mv -T ./plugins/ecso/cmxs/Windows ./plugins/ecso/cmxs/hx-4.3.7/Windows${ARCH} | ||
| cygcheck ./plugins/ecso/cmxs/hx-4.3.7/Windows${ARCH}/plugin.cmxs | ||
| ls out | ||
| # Output should contain binaries zip, installer zip and nupkg | ||
| [ $(ls -1 out | wc -l) -eq "3" ] | ||
| - name: Upload Ecso | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ecso | ||
| path: plugins/ecso/**/*.cmxs | ||
| if-no-files-found: error | ||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: win${{env.ARCH}}Binaries | ||
| retention-days: 1 | ||
| path: out | ||
| linux-build-4-3-7: | ||
| name: Haxe 4.3.7 / linux-build | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| PLATFORM: linux64 | ||
| OPAMYES: 1 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ocaml: ["5.3.0"] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| repository: 'HaxeFoundation/haxe' | ||
| submodules: recursive | ||
| ref: 'e0b355c6be312c1b17382603f018cf52522ec651' | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| path: 'plugins/ecso' | ||
| - name: Cache opam | ||
| id: cache-opam | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.opam/ | ||
| key: ${{ runner.os }}-${{ matrix.ocaml }}-${{ hashFiles('./haxe.opam', './libs/') }} | ||
| - name: Install Neko from S3 | ||
| run: | | ||
| set -ex | ||
| curl -sSL https://build.haxe.org/builds/neko/linux64/neko_latest.tar.gz -o $RUNNER_TEMP/neko_latest.tar.gz | ||
| tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP | ||
| NEKOPATH=`echo $RUNNER_TEMP/neko-*-*` | ||
| sudo mkdir -p /usr/local/bin | ||
| sudo mkdir -p /usr/local/include | ||
| sudo mkdir -p /usr/local/lib/neko | ||
| sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/ | ||
| sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/ | ||
| sudo ln -s $NEKOPATH/include/* /usr/local/include/ | ||
| sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/ | ||
| echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV | ||
| - name: Print Neko version | ||
| run: neko -version 2>&1 | ||
| - name: Install dependencies | ||
| run: | | ||
| set -ex | ||
| sudo apt-get update -qqy | ||
| sudo apt-get install -qqy darcs bubblewrap ocaml-nox libpcre2-dev zlib1g-dev libgtk2.0-dev libmbedtls-dev ninja-build libstring-shellquote-perl libipc-system-simple-perl | ||
| curl -sSL https://github.com/ocaml/opam/releases/download/2.3.0/opam-2.3.0-x86_64-linux -o $RUNNER_TEMP/opam | ||
| sudo install $RUNNER_TEMP/opam /usr/local/bin/opam | ||
| - name: Install OCaml libraries | ||
| if: steps.cache-opam.outputs.cache-hit != 'true' | ||
| run: | | ||
| set -ex | ||
| opam init # --disable-sandboxing | ||
| opam update | ||
| opam switch create ${{ matrix.ocaml }} | ||
| opam pin add haxe . --no-action | ||
| opam install haxe --deps-only --assume-depexts | ||
| opam list | ||
| ocamlopt -v | ||
| - name: Set ADD_REVISION=1 for non-release | ||
| if: ${{ !false }} | ||
| run: echo "ADD_REVISION=1" >> $GITHUB_ENV | ||
| - name: Build Haxe + Ecso | ||
| run: | | ||
| set -ex | ||
| eval $(opam env) | ||
| opam config exec -- make -s -j`nproc` STATICLINK=1 haxe | ||
| opam config exec -- make -s haxelib | ||
| opam config exec -- make -s -j`nproc` STATICLINK=1 PLUGIN=ecso plugin | ||
| make -s package_unix | ||
| mkdir ./plugins/ecso/cmxs/hx-4.3.7 | ||
| mv ./plugins/ecso/cmxs/Linux ./plugins/ecso/cmxs/hx-4.3.7 | ||
| ldd -v ./plugins/ecso/cmxs/hx-4.3.7/Linux/plugin.cmxs | ||
| ls -l out | ||
| ldd -v ./haxe | ||
| ldd -v ./haxelib | ||
| # https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions | ||
| - name: Extract branch name | ||
| id: extract_branch | ||
| shell: bash | ||
| run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | ||
| - name: Upload Ecso | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ecso | ||
| path: plugins/ecso/**/*.cmxs | ||
| if-no-files-found: error | ||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: linuxBinaries | ||
| retention-days: 1 | ||
| path: out | ||
| mac-build-4-3-7: | ||
| name: Haxe 4.3.7 / mac-build | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [macos-14, macos-13] | ||
| runs-on: ${{ matrix.os }} | ||
| env: | ||
| PLATFORM: mac${{ matrix.os == 'macos-14' && '-arm64' || '' }} | ||
| OPAMYES: 1 | ||
| MACOSX_DEPLOYMENT_TARGET: 10.13 | ||
| OCAML_VERSION: 5.1.1 | ||
| CTYPES: 0.21.1 | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| repository: 'HaxeFoundation/haxe' | ||
| submodules: recursive | ||
| ref: 'e0b355c6be312c1b17382603f018cf52522ec651' | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| path: 'plugins/ecso' | ||
| - name: Cache opam | ||
| id: cache-opam | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.opam/ | ||
| key: ${{ matrix.os }}-${{ hashFiles('./haxe.opam', './libs/') }} | ||
| - name: Install Neko from S3 | ||
| run: | | ||
| set -ex | ||
| curl -sSL https://build.haxe.org/builds/neko/mac/neko_latest.tar.gz -o $RUNNER_TEMP/neko_latest.tar.gz | ||
| tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP | ||
| NEKOPATH=`echo $RUNNER_TEMP/neko-*-*` | ||
| sudo mkdir -p /usr/local/bin | ||
| sudo mkdir -p /usr/local/include | ||
| sudo mkdir -p /usr/local/lib/neko | ||
| sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/ | ||
| sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/ | ||
| sudo ln -s $NEKOPATH/include/* /usr/local/include/ | ||
| sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/ | ||
| echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV | ||
| - name: Print Neko version | ||
| run: neko -version 2>&1 | ||
| - name: Install dependencies | ||
| env: | ||
| # For compatibility with macOS 10.13 | ||
| ZLIB_VERSION: 1.3.1 | ||
| MBEDTLS_VERSION: 2.28.5 | ||
| PCRE2_VERSION: 10.42 | ||
| run: | | ||
| set -ex | ||
| brew update | ||
| brew bundle --file=tests/Brewfile --no-upgrade | ||
| cpanm IPC::System::Simple | ||
| cpanm String::ShellQuote | ||
| curl -L https://github.com/madler/zlib/releases/download/v$ZLIB_VERSION/zlib-$ZLIB_VERSION.tar.gz | tar xz | ||
| cd zlib-$ZLIB_VERSION | ||
| ./configure | ||
| sudo make && sudo make install | ||
| cd .. | ||
| curl -L https://github.com/ARMmbed/mbedtls/archive/v$MBEDTLS_VERSION.tar.gz | tar xz | ||
| cd mbedtls-$MBEDTLS_VERSION | ||
| sudo make && sudo make install | ||
| cd .. | ||
| curl -L https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$PCRE2_VERSION/pcre2-$PCRE2_VERSION.tar.gz | tar xz | ||
| cd pcre2-$PCRE2_VERSION | ||
| ./configure --enable-unicode --enable-pcre2-8 --enable-pcre2-16 --enable-pcre2-32 --enable-unicode-properties --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-jit | ||
| sudo make && sudo 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 ${{env.OCAML_VERSION}} | ||
| eval $(opam env) | ||
| opam env | ||
| opam pin add ctypes ${{env.CTYPES}} --yes | ||
| opam pin add haxe . --no-action | ||
| opam install haxe --deps-only --assume-depexts | ||
| opam list | ||
| ocamlopt -v | ||
| - name: Set ADD_REVISION=1 for non-release | ||
| if: ${{ !false }} | ||
| run: echo "ADD_REVISION=1" >> $GITHUB_ENV | ||
| - name: Build Haxe + Ecso | ||
| run: | | ||
| set -ex | ||
| eval $(opam env) | ||
| opam config exec -- make -s -j`sysctl -n hw.ncpu` STATICLINK=1 "LIB_PARAMS=/usr/local/lib/libz.a /usr/local/lib/libpcre2-8.a /usr/local/lib/libmbedtls.a /usr/local/lib/libmbedcrypto.a /usr/local/lib/libmbedx509.a -cclib '-framework Security -framework CoreFoundation'" haxe | ||
| opam config exec -- make -s haxelib | ||
| opam config exec -- make -s -j`sysctl -n hw.ncpu` STATICLINK=1 "LIB_PARAMS=/usr/local/lib/libz.a /usr/local/lib/libpcre2-8.a /usr/local/lib/libmbedtls.a /usr/local/lib/libmbedcrypto.a /usr/local/lib/libmbedx509.a -cclib '-framework Security -framework CoreFoundation'" PLUGIN=ecso plugin | ||
| make -s package_unix package_installer_mac | ||
| mkdir ./plugins/ecso/cmxs/hx-4.3.7 | ||
| mv ./plugins/ecso/cmxs/Mac ./plugins/ecso/cmxs/hx-4.3.7 | ||
| otool -L ./plugins/ecso/cmxs/hx-4.3.7/Mac/plugin.cmxs | ||
| ls -l out | ||
| otool -L ./haxe | ||
| otool -L ./haxelib | ||
| - name: Upload artifact (x64) | ||
| if: runner.arch == 'X64' | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: macX64Binaries | ||
| path: out | ||
| - name: Upload artifact (arm) | ||
| if: runner.arch == 'ARM64' | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: macArmBinaries | ||
| path: out | ||
| windows64-test-4-3-7: | ||
| name: Haxe 4.3.7 / windows64-test | ||
| needs: [packaging, windows64-build-4-3-7] | ||
| runs-on: windows-latest | ||
| continue-on-error: ${{matrix.target == 'jvm'}} | ||
| env: | ||
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
| PLATFORM: windows64 | ||
| TEST: ${{matrix.target}} | ||
| HXCPP_COMPILE_CACHE: ~/hxcache | ||
| ARCH: 64 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| # TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/10919 | ||
| target: [interp, js, hl, cpp, cs, server, jvm] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| repository: 'HaxeFoundation/haxe' | ||
| submodules: recursive | ||
| ref: 'e0b355c6be312c1b17382603f018cf52522ec651' | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| path: 'plugins/ecso' | ||
| - uses: actions/download-artifact@v2 | ||
| with: | ||
| name: ecso | ||
| path: ${{github.workspace}}/plugins/ecso/ | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: win${{env.ARCH}}Binaries | ||
| path: win${{env.ARCH}}Binaries | ||
| - name: Install Neko from S3 | ||
| shell: pwsh | ||
| run: | | ||
| Invoke-WebRequest https://build.haxe.org/builds/neko/windows64/neko_latest.zip -OutFile $env:RUNNER_TEMP/neko_latest.zip | ||
| Expand-Archive $env:RUNNER_TEMP/neko_latest.zip -DestinationPath $env:RUNNER_TEMP | ||
| $NEKOPATH = Get-ChildItem $env:RUNNER_TEMP/neko-*-* | ||
| echo "$NEKOPATH" >> $env:GITHUB_PATH | ||
| echo "NEKOPATH=$NEKOPATH" >> $env:GITHUB_ENV | ||
| - name: Print Neko version | ||
| run: neko -version 2>&1 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18.17.1 | ||
| # - name: Quick test | ||
| # shell: pwsh | ||
| # run: | | ||
| # $DOWNLOADDIR="./win$($env:ARCH)Binaries" | ||
| # new-item -Name $DOWNLOADDIR -ItemType directory | ||
| # Invoke-WebRequest https://build.haxe.org/builds/haxe/$env:PLATFORM/haxe_latest.zip -OutFile $DOWNLOADDIR/haxe_bin.zip | ||
| - name: Setup Haxe | ||
| shell: pwsh | ||
| run: | | ||
| $DOWNLOADDIR="./win$($env:ARCH)Binaries" | ||
| Expand-Archive $DOWNLOADDIR/*_bin.zip -DestinationPath $DOWNLOADDIR | ||
| Set-PSDebug -Trace 1 | ||
| $HAXEPATH = Get-ChildItem $DOWNLOADDIR/haxe_*_* -Directory | ||
| Write-Host "::add-path::$HAXEPATH" | ||
| Write-Host "::set-env name=HAXELIB_ROOT::$HAXEPATH\lib" | ||
| - name: Print Haxe version | ||
| shell: pwsh | ||
| run: haxe -version | ||
| - name: "Make Python 3 be available as python3 in the cmdline" | ||
| shell: pwsh | ||
| run: | | ||
| Set-PSDebug -Trace 1 | ||
| $pypath = python -c "import sys; print(sys.executable)" | ||
| $py3path = $pypath.replace("python.exe","python3.exe") | ||
| cmd /c mklink $py3path $pypath | ||
| python3 -V | ||
| - name: Install hererocks | ||
| if: matrix.target == 'lua' | ||
| shell: cmd | ||
| run: | | ||
| pip install hererocks | ||
| hererocks lua53 -l5.3 -rlatest | ||
| call lua53/bin/activate | ||
| - name: Install wget | ||
| if: matrix.target == 'flash' | ||
| shell: cmd | ||
| run: | | ||
| choco install wget | ||
| wget --version | ||
| - name: Setup haxelib | ||
| shell: pwsh | ||
| run: | | ||
| mkdir "$env:HAXELIB_ROOT" | ||
| haxelib setup "$env:HAXELIB_ROOT" | ||
| - name: Test | ||
| shell: pwsh | ||
| run: haxe RunCi.hxml | ||
| working-directory: ${{github.workspace}}/plugins/ecso/tests | ||
| windows-test-4-3-7: | ||
| name: Haxe 4.3.7 / windows-test | ||
| needs: [packaging, windows-build-4-3-7] | ||
| runs-on: windows-latest | ||
| continue-on-error: true | ||
| env: | ||
| ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
| PLATFORM: windows | ||
| TEST: ${{matrix.target}} | ||
| HXCPP_COMPILE_CACHE: ~/hxcache | ||
| ARCH: 32 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| # TODO jvm: https://github.com/HaxeFoundation/haxe/issues/8601 | ||
| # TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/10919 | ||
| target: [interp, js, hl, cpp, cs, server, jvm] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| repository: 'HaxeFoundation/haxe' | ||
| submodules: recursive | ||
| ref: 'e0b355c6be312c1b17382603f018cf52522ec651' | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| path: 'plugins/ecso' | ||
| - uses: actions/download-artifact@v2 | ||
| with: | ||
| name: ecso | ||
| path: ${{github.workspace}}/plugins/ecso/ | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: win${{env.ARCH}}Binaries | ||
| path: win${{env.ARCH}}Binaries | ||
| - name: Install Neko from S3 | ||
| shell: pwsh | ||
| run: | | ||
| Invoke-WebRequest https://build.haxe.org/builds/neko/windows/neko_latest.zip -OutFile $env:RUNNER_TEMP/neko_latest.zip | ||
| Expand-Archive $env:RUNNER_TEMP/neko_latest.zip -DestinationPath $env:RUNNER_TEMP | ||
| $NEKOPATH = Get-ChildItem $env:RUNNER_TEMP/neko-*-* | ||
| echo "$NEKOPATH" >> $env:GITHUB_PATH | ||
| echo "NEKOPATH=$NEKOPATH" >> $env:GITHUB_ENV | ||
| - name: Print Neko version | ||
| run: neko -version 2>&1 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 18.17.1 | ||
| # - name: Quick test | ||
| # shell: pwsh | ||
| # run: | | ||
| # $DOWNLOADDIR="./win$($env:ARCH)Binaries" | ||
| # new-item -Name $DOWNLOADDIR -ItemType directory | ||
| # Invoke-WebRequest https://build.haxe.org/builds/haxe/$env:PLATFORM/haxe_latest.zip -OutFile $DOWNLOADDIR/haxe_bin.zip | ||
| - name: Setup Haxe | ||
| shell: pwsh | ||
| run: | | ||
| $DOWNLOADDIR="./win$($env:ARCH)Binaries" | ||
| Expand-Archive $DOWNLOADDIR/*_bin.zip -DestinationPath $DOWNLOADDIR | ||
| Set-PSDebug -Trace 1 | ||
| $HAXEPATH = Get-ChildItem $DOWNLOADDIR/haxe_*_* -Directory | ||
| Write-Host "::add-path::$HAXEPATH" | ||
| Write-Host "::set-env name=HAXELIB_ROOT::$HAXEPATH\lib" | ||
| - name: Print Haxe version | ||
| shell: pwsh | ||
| run: haxe -version | ||
| - name: "Make Python 3 be available as python3 in the cmdline" | ||
| shell: pwsh | ||
| run: | | ||
| Set-PSDebug -Trace 1 | ||
| $pypath = python -c "import sys; print(sys.executable)" | ||
| $py3path = $pypath.replace("python.exe","python3.exe") | ||
| cmd /c mklink $py3path $pypath | ||
| python3 -V | ||
| - name: Install hererocks | ||
| if: matrix.target == 'lua' | ||
| shell: cmd | ||
| run: | | ||
| pip install hererocks | ||
| hererocks lua53 -l5.3 -rlatest | ||
| call lua53/bin/activate | ||
| - name: Install wget | ||
| if: matrix.target == 'flash' | ||
| shell: cmd | ||
| run: | | ||
| choco install wget | ||
| wget --version | ||
| - name: Setup haxelib | ||
| shell: pwsh | ||
| run: | | ||
| mkdir "$env:HAXELIB_ROOT" | ||
| haxelib setup "$env:HAXELIB_ROOT" | ||
| - name: Test | ||
| shell: pwsh | ||
| run: haxe RunCi.hxml | ||
| working-directory: ${{github.workspace}}/plugins/ecso/tests | ||
| linux-test-4-3-7: | ||
| name: Haxe 4.3.7 / linux-test | ||
| needs: [packaging, linux-build-4-3-7] | ||
| runs-on: ubuntu-latest | ||
| continue-on-error: ${{matrix.target == 'jvm'}} | ||
| env: | ||
| PLATFORM: linux64 | ||
| TEST: ${{matrix.target}} | ||
| HXCPP_COMPILE_CACHE: ~/hxcache | ||
| HAXE_STD_PATH: /usr/local/share/haxe/std | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| ocaml: ["4.14.0", "5.3.0"] | ||
| target: [interp, js, hl, cpp, cs, server, jvm] | ||
| include: | ||
| - target: hl | ||
| APT_PACKAGES: cmake ninja-build libturbojpeg-dev | ||
| - target: cpp | ||
| APT_PACKAGES: gcc-multilib g++-multilib | ||
| - target: lua | ||
| APT_PACKAGES: ncurses-dev | ||
| - target: flash | ||
| APT_PACKAGES: libglib2.0-0 libgtk2.0-0 libfreetype6 xvfb | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| repository: 'HaxeFoundation/haxe' | ||
| submodules: recursive | ||
| ref: 'e0b355c6be312c1b17382603f018cf52522ec651' | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| path: 'plugins/ecso' | ||
| - uses: actions/download-artifact@v2 | ||
| with: | ||
| name: ecso | ||
| path: ${{github.workspace}}/plugins/ecso/ | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: linuxBinaries | ||
| path: linuxBinaries | ||
| - name: Install Neko from S3 | ||
| run: | | ||
| set -ex | ||
| curl -sSL https://build.haxe.org/builds/neko/linux64/neko_latest.tar.gz -o $RUNNER_TEMP/neko_latest.tar.gz | ||
| tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP | ||
| NEKOPATH=`echo $RUNNER_TEMP/neko-*-*` | ||
| sudo mkdir -p /usr/local/bin | ||
| sudo mkdir -p /usr/local/include | ||
| sudo mkdir -p /usr/local/lib/neko | ||
| sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/ | ||
| sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/ | ||
| sudo ln -s $NEKOPATH/include/* /usr/local/include/ | ||
| sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/ | ||
| echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV | ||
| - name: Print Neko version | ||
| run: neko -version 2>&1 | ||
| - name: Setup Haxe | ||
| run: | | ||
| sudo apt install -qqy libmbedtls-dev | ||
| set -ex | ||
| tar -xf linuxBinaries/*_bin.tar.gz -C linuxBinaries --strip-components=1 | ||
| sudo mkdir -p /usr/local/bin/ | ||
| sudo mkdir -p /usr/local/share/haxe/ | ||
| sudo ln -s `pwd`/linuxBinaries/haxe /usr/local/bin/haxe | ||
| sudo ln -s `pwd`/linuxBinaries/haxelib /usr/local/bin/haxelib | ||
| sudo ln -s `pwd`/linuxBinaries/std /usr/local/share/haxe/std | ||
| - name: Print Haxe version | ||
| run: haxe -version | ||
| - name: Setup haxelib | ||
| run: | | ||
| set -ex | ||
| mkdir ~/haxelib | ||
| haxelib setup ~/haxelib | ||
| - name: Install apt packages | ||
| if: matrix.APT_PACKAGES | ||
| run: | | ||
| set -ex | ||
| sudo apt update -qqy | ||
| sudo apt install -qqy ${{matrix.APT_PACKAGES}} | ||
| - name: Flash setup | ||
| if: matrix.target == 'flash' | ||
| run: export DISPLAY=:99.0 | ||
| - name: Test | ||
| run: haxe RunCi.hxml | ||
| working-directory: ${{github.workspace}}/plugins/ecso/testss | ||
| mac-test-4-3-7: | ||
| name: Haxe 4.3.7 / mac-test | ||
| needs: mac-build-universal | ||
| runs-on: macos-latest | ||
| continue-on-error: ${{matrix.target == 'jvm'}} | ||
| env: | ||
| PLATFORM: mac | ||
| TEST: ${{matrix.target}} | ||
| HXCPP_COMPILE_CACHE: ~/hxcache | ||
| HAXE_STD_PATH: /usr/local/share/haxe/std | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| target: [interp, js, hl, cpp, cs, server, jvm] | ||
| include: | ||
| - target: hl | ||
| BREW_PACKAGES: ninja | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| repository: 'HaxeFoundation/haxe' | ||
| submodules: recursive | ||
| ref: 'e0b355c6be312c1b17382603f018cf52522ec651' | ||
| - uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
| path: 'plugins/ecso' | ||
| - uses: actions/download-artifact@v2 | ||
| with: | ||
| name: ecso | ||
| path: ${{github.workspace}}/plugins/ecso/ | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| name: macBinaries | ||
| path: macBinaries | ||
| - name: Install Neko from S3 | ||
| run: | | ||
| set -ex | ||
| curl -sSL https://build.haxe.org/builds/neko/mac/neko_latest.tar.gz -o $RUNNER_TEMP/neko_latest.tar.gz | ||
| tar -xf $RUNNER_TEMP/neko_latest.tar.gz -C $RUNNER_TEMP | ||
| NEKOPATH=`echo $RUNNER_TEMP/neko-*-*` | ||
| sudo mkdir -p /usr/local/bin | ||
| sudo mkdir -p /usr/local/include | ||
| sudo mkdir -p /usr/local/lib/neko | ||
| sudo ln -s $NEKOPATH/{neko,nekoc,nekoml,nekotools} /usr/local/bin/ | ||
| sudo ln -s $NEKOPATH/libneko.* /usr/local/lib/ | ||
| sudo ln -s $NEKOPATH/include/* /usr/local/include/ | ||
| sudo ln -s $NEKOPATH/*.ndll /usr/local/lib/neko/ | ||
| echo "NEKOPATH=$NEKOPATH" >> $GITHUB_ENV | ||
| - name: Print Neko version | ||
| run: neko -version 2>&1 | ||
| - name: Setup Haxe | ||
| run: | | ||
| # mkdir ./macBinaries | ||
| # curl -sSL https://build.haxe.org/builds/haxe/mac/haxe_latest.tar.gz -o ./macBinaries/haxe_bin.tar.gz | ||
| set -ex | ||
| tar -xf macBinaries/*_bin.tar.gz -C macBinaries --strip-components=1 | ||
| sudo mkdir -p /usr/local/bin/ | ||
| sudo mkdir -p /usr/local/share/haxe/ | ||
| sudo ln -s `pwd`/macBinaries/haxe /usr/local/bin/haxe | ||
| sudo ln -s `pwd`/macBinaries/haxelib /usr/local/bin/haxelib | ||
| sudo ln -s `pwd`/macBinaries/std /usr/local/share/haxe/std | ||
| - name: Print Haxe version | ||
| run: haxe -version | ||
| - name: Setup haxelib | ||
| run: | | ||
| set -ex | ||
| mkdir ~/haxelib | ||
| haxelib setup ~/haxelib | ||
| - name: Install homebrew packages | ||
| if: matrix.BREW_PACKAGES | ||
| run: brew install ${{matrix.BREW_PACKAGES}} | ||
| - name: Test | ||
| run: | | ||
| # disable invalid Unicode filenames on APFS | ||
| echo "" > ${{github.workspace}}/tests/sys/compile-fs.hxml | ||
| haxe RunCi.hxml | ||
| working-directory: ${{github.workspace}}/plugins/ecso/tests | ||