From e0ae6475531e62e2c02df5318855657b771f61ee Mon Sep 17 00:00:00 2001 From: Rudy Ges Date: Thu, 30 Jan 2025 12:15:24 +0100 Subject: [PATCH] test std vs binaries --- .github/workflows/main.yml | 127 ++++++++++++++++++++++++++++++++++++- 1 file changed, 126 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be8b109f423..fc6d912638a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,7 @@ name: CI on: [push, pull_request] jobs: - windows64-test: + windows64-test-std: runs-on: windows-latest env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true @@ -23,6 +23,14 @@ jobs: - uses: actions/checkout@main with: submodules: recursive + + - uses: actions/download-artifact@v4 + with: + name: win${{env.ARCH}}Binaries + path: win${{env.ARCH}}Std + run-id: 13046524323 + github-token: ${{ secrets.TMP_CI_TOKEN }} + - uses: actions/download-artifact@v4 with: name: win${{env.ARCH}}Binaries @@ -30,6 +38,123 @@ jobs: run-id: 13033892189 github-token: ${{ secrets.TMP_CI_TOKEN }} + - name: Merge std and binaries + shell: pwsh + run: | + mv win64Std/std win64Binaries/std + + - 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 + working-directory: ${{github.workspace}}/tests + run: | + rm D:\a\haxe\haxe\win64Binaries\haxe_20250129144804_9fd0c49\std\haxe\macro\ExampleJSGenerator.hx + haxe RunCi.hxml + + windows64-test-binary: + runs-on: windows-latest + 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: [macro] + # 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}}Std + run-id: 13033892189 + github-token: ${{ secrets.TMP_CI_TOKEN }} + + - uses: actions/download-artifact@v4 + with: + name: win${{env.ARCH}}Binaries + path: win${{env.ARCH}}Binaries + run-id: 13046524323 + github-token: ${{ secrets.TMP_CI_TOKEN }} + + - name: Merge std and binaries + shell: pwsh + run: | + mv win64Std/std win64Binaries/std + - name: Install Neko from S3 shell: pwsh run: |