build-windows.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. - name: Expose mingw dll files
  2. shell: pwsh
  3. run: Write-Host "::add-path::${env:CYG_ROOT}/usr/$($env:MINGW_ARCH)-w64-mingw32/sys-root/mingw/bin"
  4. # required to be able to retrieve the revision
  5. - name: Mark directory as safe
  6. shell: pwsh
  7. run: |
  8. Set-PSDebug -Trace 1
  9. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'git config --global --add safe.directory "$OLDPWD"')
  10. - name: Set ADD_REVISION=1 for non-release
  11. if: ${{ !startsWith(github.ref, 'refs/tags/') }}
  12. shell: pwsh
  13. run: echo "ADD_REVISION=1" >> $Env:GITHUB_ENV
  14. - name: Build Haxe
  15. shell: pwsh
  16. run: |
  17. Set-PSDebug -Trace 1
  18. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win -j`nproc` haxe 2>&1')
  19. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam config exec -- make -s -f Makefile.win haxelib 2>&1')
  20. & "$($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')
  21. dir out
  22. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxe.exe')
  23. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && cygcheck ./haxelib.exe')
  24. & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && ls ./out')
  25. - name: Check artifact
  26. shell: bash
  27. run: |
  28. ls out
  29. # Output should contain binaries zip, installer zip and nupkg
  30. [ $(ls -1 out | wc -l) -eq "3" ]
  31. - name: Upload artifact
  32. uses: actions/upload-artifact@v3
  33. with:
  34. name: win${{env.ARCH}}Binaries
  35. path: out