[CI] again #7156
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
# DO NOT EDIT. Generated from /extra/github-actions | |
# TODO: support skip ci (https://github.community/t/github-actions-does-not-respect-skip-ci/17325/8) | |
name: CI | |
on: [push, pull_request] | |
jobs: | |
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@main | |
with: | |
submodules: recursive | |
- 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/$env:PLATFORM/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@v3 | |
with: | |
ocaml-compiler: 4 | |
opam-local-packages: | | |
haxe.opam | |
- name: Install dependencies | |
shell: pwsh | |
env: | |
MBEDTLS_VERSION: 2.16.3 | |
run: | | |
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 | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 10 | |
retry_on: timeout | |
shell: pwsh | |
command: | | |
Set-PSDebug -Trace 1 | |
# stop after any command returns an error | |
$PSNativeCommandUseErrorActionPreference = $true | |
$ErrorActionPreference = 'Stop' | |
# 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 list | |
- name: Set ADD_REVISION=1 for non-release | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
shell: pwsh | |
run: echo "ADD_REVISION=1" >> $Env:GITHUB_ENV | |
- name: Build Haxe | |
shell: pwsh | |
run: | | |
Set-PSDebug -Trace 1 | |
# 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 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win${{env.ARCH}}Binaries | |
path: out | |
windows64-build-a: | |
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@main | |
with: | |
submodules: recursive | |
- 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/$env:PLATFORM/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@v3 | |
with: | |
ocaml-compiler: 4 | |
opam-local-packages: | | |
haxe.opam | |
- name: Install dependencies | |
shell: pwsh | |
env: | |
MBEDTLS_VERSION: 2.16.3 | |
run: | | |
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 | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 10 | |
retry_on: timeout | |
shell: pwsh | |
command: | | |
Set-PSDebug -Trace 1 | |
# stop after any command returns an error | |
$PSNativeCommandUseErrorActionPreference = $true | |
$ErrorActionPreference = 'Stop' | |
# 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 list | |
- name: Set ADD_REVISION=1 for non-release | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
shell: pwsh | |
run: echo "ADD_REVISION=1" >> $Env:GITHUB_ENV | |
- name: Build Haxe | |
shell: pwsh | |
run: | | |
Set-PSDebug -Trace 1 | |
# 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 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win${{env.ARCH}}Binaries2 | |
path: out | |
windows64-test: | |
needs: windows64-build | |
runs-on: windows-latest | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
PLATFORM: windows64 | |
TEST: ${{matrix.target}} | |
TEST_6408: ${{matrix.testIssue6408}} | |
HXCPP_COMPILE_CACHE: ~/hxcache | |
ARCH: 64 | |
strategy: | |
fail-fast: false | |
matrix: | |
# TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/10919 | |
target: [macro] | |
test: [a, b, c] | |
testIssue6408: [0, 1] | |
# target: [macro, js, hl, cpp, jvm, php, python, flash, neko] | |
steps: | |
- uses: actions/checkout@main | |
with: | |
submodules: recursive | |
- 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/$env:PLATFORM/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}}/tests | |
windows64-test-a: | |
needs: windows64-build-a | |
runs-on: windows-latest | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
PLATFORM: windows64 | |
TEST: ${{matrix.target}} | |
TEST_6408: ${{matrix.testIssue6408}} | |
HXCPP_COMPILE_CACHE: ~/hxcache | |
ARCH: 64 | |
strategy: | |
fail-fast: false | |
matrix: | |
# TODO enable lua after https://github.com/HaxeFoundation/haxe/issues/10919 | |
target: [macro] | |
test: [a, b, c] | |
testIssue6408: [0, 1] | |
# target: [macro, js, hl, cpp, jvm, php, python, flash, neko] | |
steps: | |
- uses: actions/checkout@main | |
with: | |
submodules: recursive | |
- uses: actions/download-artifact@v4 | |
with: | |
name: win${{env.ARCH}}Binaries2 | |
path: win${{env.ARCH}}Binaries | |
- name: Install Neko from S3 | |
shell: pwsh | |
run: | | |
Invoke-WebRequest https://build.haxe.org/builds/neko/$env:PLATFORM/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}}/tests | |