|
@@ -5,187 +5,51 @@ name: CI
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
jobs:
|
|
|
- cancel:
|
|
|
- name: "Cancel previous runs"
|
|
|
- runs-on: ubuntu-16.04
|
|
|
- timeout-minutes: 3
|
|
|
- steps:
|
|
|
- - uses: styfle/[email protected]
|
|
|
- with:
|
|
|
- workflow_id: 1447568
|
|
|
- access_token: ${{ github.token }}
|
|
|
+ # cancel:
|
|
|
+ # name: "Cancel previous runs"
|
|
|
+ # runs-on: ubuntu-16.04
|
|
|
+ # timeout-minutes: 3
|
|
|
+ # steps:
|
|
|
+ # - uses: styfle/[email protected]
|
|
|
+ # with:
|
|
|
+ # workflow_id: 1447568
|
|
|
+ # access_token: ${{ github.token }}
|
|
|
|
|
|
- windows64-build:
|
|
|
- runs-on: windows-latest
|
|
|
- env:
|
|
|
- PLATFORM: windows64
|
|
|
- OPAMYES: 1
|
|
|
- CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
|
|
|
- ARCH: 64
|
|
|
- MINGW_ARCH: x86_64
|
|
|
- CYGWIN_SETUP: https://cygwin.com/setup-x86_64.exe
|
|
|
- CYG_ROOT: C:/cygwin64
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@main
|
|
|
- with:
|
|
|
- submodules: recursive
|
|
|
+ # windows64-build:
|
|
|
+ # runs-on: windows-latest
|
|
|
+ # env:
|
|
|
+ # PLATFORM: windows64
|
|
|
+ # OPAMYES: 1
|
|
|
+ # CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
|
|
|
+ # ARCH: 64
|
|
|
+ # MINGW_ARCH: x86_64
|
|
|
+ # CYGWIN_SETUP: https://cygwin.com/setup-x86_64.exe
|
|
|
+ # CYG_ROOT: C:/cygwin64
|
|
|
+ # steps:
|
|
|
+ # - uses: actions/checkout@main
|
|
|
+ # with:
|
|
|
+ # submodules: recursive
|
|
|
|
|
|
- - name: Install Neko using snapshot from S3 (Windows)
|
|
|
- if: startsWith(env.PLATFORM, 'windows')
|
|
|
- shell: pwsh
|
|
|
- run: |
|
|
|
- $DOWNLOADDIR="./temp"
|
|
|
- new-item -Name $DOWNLOADDIR -ItemType directory
|
|
|
- Invoke-WebRequest https://build.haxe.org/builds/neko/$env:PLATFORM/neko_latest.zip -OutFile $DOWNLOADDIR/neko_latest.zip
|
|
|
- Expand-Archive $DOWNLOADDIR/neko_latest.zip -DestinationPath $DOWNLOADDIR
|
|
|
- $NEKOPATH = Get-ChildItem $DOWNLOADDIR/neko-*-*
|
|
|
- Write-Host "::add-path::$NEKOPATH"
|
|
|
- Write-Host "::set-env name=NEKOPATH::$NEKOPATH"
|
|
|
-
|
|
|
- - name: Print Neko version
|
|
|
- run: neko -version 2>&1
|
|
|
-
|
|
|
-
|
|
|
- - name: choco install nsis
|
|
|
- uses: nick-invision/retry@v1
|
|
|
- with:
|
|
|
- timeout_minutes: 10
|
|
|
- max_attempts: 10
|
|
|
- command: choco install --no-progress nsis.portable --version 3.02 -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 OCaml and OCaml libraries
|
|
|
- shell: pwsh
|
|
|
- run: |
|
|
|
- Set-PSDebug -Trace 1
|
|
|
- curl.exe -fsSL -o cygwin-setup.exe --retry 3 $($env:CYGWIN_SETUP)
|
|
|
- Start-Process -FilePath "cygwin-setup.exe" -ArgumentList "-B -q -R $($env:CYG_ROOT) -l C:/tmp -s $($env:CYG_MIRROR) -P default -P make -P git -P zlib-devel -P rsync -P patch -P diffutils -P curl -P unzip -P tar -P m4 -P perl -P libpcre-devel -P mbedtls-devel -P mingw64-$($env:MINGW_ARCH)-zlib -P mingw64-$($env:MINGW_ARCH)-gcc-core -P mingw64-$($env:MINGW_ARCH)-pcre" -Wait
|
|
|
- curl.exe -fsSL -o "opam.tar.xz" --retry 3 https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam$($env:ARCH).tar.xz
|
|
|
- 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', 'echo "$OLDPWD"')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -C / -xvf libmbedtls.tar.xz')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -xf opam.tar.xz')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && bash opam${ARCH}/install.sh')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam init mingw "https://github.com/fdopen/opam-repository-mingw.git#opam2" --comp 4.07.0+mingw${ARCH}c --switch 4.07.0+mingw${ARCH}c --auto-setup --yes 2>&1')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam update --yes 2>&1')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam pin add haxe . --kind=path --no-action --yes 2>&1')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam install haxe --deps-only --yes 2>&1')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam list')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'ocamlopt -v')
|
|
|
-
|
|
|
- - 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"
|
|
|
-
|
|
|
- - name: Build Haxe
|
|
|
- shell: pwsh
|
|
|
- run: |
|
|
|
- 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: Upload artifact
|
|
|
- uses: actions/[email protected]
|
|
|
- with:
|
|
|
- name: win${{env.ARCH}}Binaries
|
|
|
- path: out
|
|
|
-
|
|
|
+ # @import install-neko-windows.yml
|
|
|
+ # @import build-windows.yml
|
|
|
|
|
|
- windows-build:
|
|
|
- runs-on: windows-latest
|
|
|
- env:
|
|
|
- PLATFORM: windows
|
|
|
- OPAMYES: 1
|
|
|
- CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
|
|
|
- ARCH: 32
|
|
|
- MINGW_ARCH: i686
|
|
|
- CYGWIN_SETUP: https://cygwin.com/setup-x86.exe
|
|
|
- CYG_ROOT: C:/cygwin
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@main
|
|
|
- with:
|
|
|
- submodules: recursive
|
|
|
+ # windows-build:
|
|
|
+ # runs-on: windows-latest
|
|
|
+ # env:
|
|
|
+ # PLATFORM: windows
|
|
|
+ # OPAMYES: 1
|
|
|
+ # CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
|
|
|
+ # ARCH: 32
|
|
|
+ # MINGW_ARCH: i686
|
|
|
+ # CYGWIN_SETUP: https://cygwin.com/setup-x86.exe
|
|
|
+ # CYG_ROOT: C:/cygwin
|
|
|
+ # steps:
|
|
|
+ # - uses: actions/checkout@main
|
|
|
+ # with:
|
|
|
+ # submodules: recursive
|
|
|
|
|
|
- - name: Install Neko using snapshot from S3 (Windows)
|
|
|
- if: startsWith(env.PLATFORM, 'windows')
|
|
|
- shell: pwsh
|
|
|
- run: |
|
|
|
- $DOWNLOADDIR="./temp"
|
|
|
- new-item -Name $DOWNLOADDIR -ItemType directory
|
|
|
- Invoke-WebRequest https://build.haxe.org/builds/neko/$env:PLATFORM/neko_latest.zip -OutFile $DOWNLOADDIR/neko_latest.zip
|
|
|
- Expand-Archive $DOWNLOADDIR/neko_latest.zip -DestinationPath $DOWNLOADDIR
|
|
|
- $NEKOPATH = Get-ChildItem $DOWNLOADDIR/neko-*-*
|
|
|
- Write-Host "::add-path::$NEKOPATH"
|
|
|
- Write-Host "::set-env name=NEKOPATH::$NEKOPATH"
|
|
|
-
|
|
|
- - name: Print Neko version
|
|
|
- run: neko -version 2>&1
|
|
|
-
|
|
|
-
|
|
|
- - name: choco install nsis
|
|
|
- uses: nick-invision/retry@v1
|
|
|
- with:
|
|
|
- timeout_minutes: 10
|
|
|
- max_attempts: 10
|
|
|
- command: choco install --no-progress nsis.portable --version 3.02 -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 OCaml and OCaml libraries
|
|
|
- shell: pwsh
|
|
|
- run: |
|
|
|
- Set-PSDebug -Trace 1
|
|
|
- curl.exe -fsSL -o cygwin-setup.exe --retry 3 $($env:CYGWIN_SETUP)
|
|
|
- Start-Process -FilePath "cygwin-setup.exe" -ArgumentList "-B -q -R $($env:CYG_ROOT) -l C:/tmp -s $($env:CYG_MIRROR) -P default -P make -P git -P zlib-devel -P rsync -P patch -P diffutils -P curl -P unzip -P tar -P m4 -P perl -P libpcre-devel -P mbedtls-devel -P mingw64-$($env:MINGW_ARCH)-zlib -P mingw64-$($env:MINGW_ARCH)-gcc-core -P mingw64-$($env:MINGW_ARCH)-pcre" -Wait
|
|
|
- curl.exe -fsSL -o "opam.tar.xz" --retry 3 https://github.com/fdopen/opam-repository-mingw/releases/download/0.0.0.2/opam$($env:ARCH).tar.xz
|
|
|
- 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', 'echo "$OLDPWD"')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -C / -xvf libmbedtls.tar.xz')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && tar -xf opam.tar.xz')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && bash opam${ARCH}/install.sh')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam init mingw "https://github.com/fdopen/opam-repository-mingw.git#opam2" --comp 4.07.0+mingw${ARCH}c --switch 4.07.0+mingw${ARCH}c --auto-setup --yes 2>&1')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam update --yes 2>&1')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'cd "$OLDPWD" && opam pin add haxe . --kind=path --no-action --yes 2>&1')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam install haxe --deps-only --yes 2>&1')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'opam list')
|
|
|
- & "$($env:CYG_ROOT)/bin/bash.exe" @('-lc', 'ocamlopt -v')
|
|
|
-
|
|
|
- - 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"
|
|
|
-
|
|
|
- - name: Build Haxe
|
|
|
- shell: pwsh
|
|
|
- run: |
|
|
|
- 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: Upload artifact
|
|
|
- uses: actions/[email protected]
|
|
|
- with:
|
|
|
- name: win${{env.ARCH}}Binaries
|
|
|
- path: out
|
|
|
-
|
|
|
+ # @import install-neko-windows.yml
|
|
|
+ # @import build-windows.yml
|
|
|
|
|
|
linux-build:
|
|
|
runs-on: ubuntu-16.04
|
|
@@ -244,464 +108,196 @@ jobs:
|
|
|
path: out
|
|
|
|
|
|
|
|
|
- mac-build:
|
|
|
- runs-on: macos-latest
|
|
|
- env:
|
|
|
- PLATFORM: mac
|
|
|
- OPAMYES: 1
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@main
|
|
|
- with:
|
|
|
- submodules: recursive
|
|
|
+ # mac-build:
|
|
|
+ # runs-on: macos-latest
|
|
|
+ # env:
|
|
|
+ # PLATFORM: mac
|
|
|
+ # OPAMYES: 1
|
|
|
+ # steps:
|
|
|
+ # - uses: actions/checkout@main
|
|
|
+ # with:
|
|
|
+ # submodules: recursive
|
|
|
|
|
|
- - name: Install Neko using homebrew (Mac)
|
|
|
- if: (startsWith(env.PLATFORM, 'mac'))
|
|
|
- run: |
|
|
|
- set -ex
|
|
|
- HOMEBREW_NO_AUTO_UPDATE=1
|
|
|
- brew install neko
|
|
|
-
|
|
|
- - name: Print Neko version
|
|
|
- run: neko -version 2>&1
|
|
|
-
|
|
|
-
|
|
|
- - name: Install dependencies
|
|
|
- run: |
|
|
|
- set -ex
|
|
|
- brew update
|
|
|
- brew unlink python@2
|
|
|
- brew bundle --file=tests/Brewfile --no-upgrade
|
|
|
-
|
|
|
- - name: Install OCaml libraries
|
|
|
- run: |
|
|
|
- set -ex
|
|
|
- opam init # --disable-sandboxing
|
|
|
- opam update
|
|
|
- opam pin add haxe . --no-action
|
|
|
- opam install haxe --deps-only
|
|
|
- opam list
|
|
|
- ocamlopt -v
|
|
|
-
|
|
|
- - name: Build Haxe
|
|
|
- run: |
|
|
|
- set -ex
|
|
|
- eval $(opam env)
|
|
|
- opam config exec -- make -s -j`sysctl -n hw.ncpu` STATICLINK=1 "LIB_PARAMS=/usr/local/opt/zlib/lib/libz.a /usr/local/lib/libpcre.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
|
|
|
- make -s package_unix package_installer_mac
|
|
|
- ls -l out
|
|
|
- otool -L ./haxe
|
|
|
- otool -L ./haxelib
|
|
|
-
|
|
|
- - name: Upload artifact
|
|
|
- uses: actions/[email protected]
|
|
|
- with:
|
|
|
- name: macBinaries
|
|
|
- path: out
|
|
|
-
|
|
|
+ # @import install-neko-mac.yml
|
|
|
+ # @import build-mac.yml
|
|
|
|
|
|
- windows64-test:
|
|
|
- needs: windows64-build
|
|
|
- runs-on: windows-latest
|
|
|
- env:
|
|
|
- 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/5024
|
|
|
- target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, neko]
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@main
|
|
|
- with:
|
|
|
- submodules: recursive
|
|
|
- - uses: actions/download-artifact@v1
|
|
|
- with:
|
|
|
- name: win${{env.ARCH}}Binaries
|
|
|
+ # windows64-test:
|
|
|
+ # needs: windows64-build
|
|
|
+ # runs-on: windows-latest
|
|
|
+ # env:
|
|
|
+ # 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/5024
|
|
|
+ # target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, neko]
|
|
|
+ # steps:
|
|
|
+ # - uses: actions/checkout@main
|
|
|
+ # with:
|
|
|
+ # submodules: recursive
|
|
|
+ # - uses: actions/download-artifact@v1
|
|
|
+ # with:
|
|
|
+ # name: win${{env.ARCH}}Binaries
|
|
|
|
|
|
- - name: Install Neko using snapshot from S3 (Windows)
|
|
|
- if: startsWith(env.PLATFORM, 'windows')
|
|
|
- shell: pwsh
|
|
|
- run: |
|
|
|
- $DOWNLOADDIR="./temp"
|
|
|
- new-item -Name $DOWNLOADDIR -ItemType directory
|
|
|
- Invoke-WebRequest https://build.haxe.org/builds/neko/$env:PLATFORM/neko_latest.zip -OutFile $DOWNLOADDIR/neko_latest.zip
|
|
|
- Expand-Archive $DOWNLOADDIR/neko_latest.zip -DestinationPath $DOWNLOADDIR
|
|
|
- $NEKOPATH = Get-ChildItem $DOWNLOADDIR/neko-*-*
|
|
|
- Write-Host "::add-path::$NEKOPATH"
|
|
|
- Write-Host "::set-env name=NEKOPATH::$NEKOPATH"
|
|
|
-
|
|
|
- - name: Print Neko version
|
|
|
- run: neko -version 2>&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: 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
|
|
|
-
|
|
|
+ # @import install-neko-windows.yml
|
|
|
+ # @import test-windows.yml
|
|
|
|
|
|
- windows-test:
|
|
|
- needs: windows-build
|
|
|
- runs-on: windows-latest
|
|
|
- env:
|
|
|
- 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/5024
|
|
|
- target: [macro, js, hl, cpp, java, cs, php, python, neko]
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@main
|
|
|
- with:
|
|
|
- submodules: recursive
|
|
|
- - uses: actions/download-artifact@v1
|
|
|
- with:
|
|
|
- name: win${{env.ARCH}}Binaries
|
|
|
+ # windows-test:
|
|
|
+ # needs: windows-build
|
|
|
+ # runs-on: windows-latest
|
|
|
+ # env:
|
|
|
+ # 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/5024
|
|
|
+ # target: [macro, js, hl, cpp, java, cs, php, python, neko]
|
|
|
+ # steps:
|
|
|
+ # - uses: actions/checkout@main
|
|
|
+ # with:
|
|
|
+ # submodules: recursive
|
|
|
+ # - uses: actions/download-artifact@v1
|
|
|
+ # with:
|
|
|
+ # name: win${{env.ARCH}}Binaries
|
|
|
|
|
|
- - name: Install Neko using snapshot from S3 (Windows)
|
|
|
- if: startsWith(env.PLATFORM, 'windows')
|
|
|
- shell: pwsh
|
|
|
- run: |
|
|
|
- $DOWNLOADDIR="./temp"
|
|
|
- new-item -Name $DOWNLOADDIR -ItemType directory
|
|
|
- Invoke-WebRequest https://build.haxe.org/builds/neko/$env:PLATFORM/neko_latest.zip -OutFile $DOWNLOADDIR/neko_latest.zip
|
|
|
- Expand-Archive $DOWNLOADDIR/neko_latest.zip -DestinationPath $DOWNLOADDIR
|
|
|
- $NEKOPATH = Get-ChildItem $DOWNLOADDIR/neko-*-*
|
|
|
- Write-Host "::add-path::$NEKOPATH"
|
|
|
- Write-Host "::set-env name=NEKOPATH::$NEKOPATH"
|
|
|
-
|
|
|
- - name: Print Neko version
|
|
|
- run: neko -version 2>&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: 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
|
|
|
-
|
|
|
+ # @import install-neko-windows.yml
|
|
|
+ # @import test-windows.yml
|
|
|
|
|
|
- linux-test:
|
|
|
- needs: linux-build
|
|
|
- runs-on: ubuntu-16.04
|
|
|
- env:
|
|
|
- PLATFORM: linux64
|
|
|
- TEST: ${{matrix.target}}
|
|
|
- HXCPP_COMPILE_CACHE: ~/hxcache
|
|
|
- strategy:
|
|
|
- fail-fast: false
|
|
|
- matrix:
|
|
|
- target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash9, neko]
|
|
|
- include:
|
|
|
- - target: js
|
|
|
- # SAUCE: 1
|
|
|
- # SAUCE_TUNNEL_ID: 'linux-test'
|
|
|
- # SAUCE_BUILD: '${{env.GITHUB_RUN_NUMBER}}' # $(Build.BuildNumber)
|
|
|
- - target: hl
|
|
|
- APT_PACKAGES: cmake ninja-build libturbojpeg-dev
|
|
|
- - target: cpp
|
|
|
- APT_PACKAGES: gcc-multilib g++-multilib
|
|
|
- - target: lua
|
|
|
- APT_PACKAGES: ncurses-dev
|
|
|
- - target: flash9
|
|
|
- APT_PACKAGES: libglib2.0 libfreetype6 xvfb
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@main
|
|
|
- with:
|
|
|
- submodules: recursive
|
|
|
- - uses: actions/download-artifact@v1
|
|
|
- with:
|
|
|
- name: linuxBinaries
|
|
|
+ # linux-test:
|
|
|
+ # needs: linux-build
|
|
|
+ # runs-on: ubuntu-16.04
|
|
|
+ # env:
|
|
|
+ # PLATFORM: linux64
|
|
|
+ # TEST: ${{matrix.target}}
|
|
|
+ # HXCPP_COMPILE_CACHE: ~/hxcache
|
|
|
+ # strategy:
|
|
|
+ # fail-fast: false
|
|
|
+ # matrix:
|
|
|
+ # target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash9, neko]
|
|
|
+ # include:
|
|
|
+ # - target: js
|
|
|
+ # # SAUCE: 1
|
|
|
+ # # SAUCE_TUNNEL_ID: 'linux-test'
|
|
|
+ # # SAUCE_BUILD: '${{env.GITHUB_RUN_NUMBER}}' # $(Build.BuildNumber)
|
|
|
+ # - target: hl
|
|
|
+ # APT_PACKAGES: cmake ninja-build libturbojpeg-dev
|
|
|
+ # - target: cpp
|
|
|
+ # APT_PACKAGES: gcc-multilib g++-multilib
|
|
|
+ # - target: lua
|
|
|
+ # APT_PACKAGES: ncurses-dev
|
|
|
+ # - target: flash9
|
|
|
+ # APT_PACKAGES: libglib2.0 libfreetype6 xvfb
|
|
|
+ # steps:
|
|
|
+ # - uses: actions/checkout@main
|
|
|
+ # with:
|
|
|
+ # submodules: recursive
|
|
|
+ # - uses: actions/download-artifact@v1
|
|
|
+ # with:
|
|
|
+ # name: linuxBinaries
|
|
|
|
|
|
- - name: Install Neko using apt-get (Linux)
|
|
|
- if: (startsWith(env.PLATFORM, 'linux'))
|
|
|
- run: |
|
|
|
- set -ex
|
|
|
- sudo add-apt-repository ppa:haxe/snapshots -y
|
|
|
- sudo apt-get update -qqy
|
|
|
- sudo apt-get install -qqy neko
|
|
|
-
|
|
|
- - name: Print Neko version
|
|
|
- run: neko -version 2>&1
|
|
|
-
|
|
|
-
|
|
|
- - name: Setup Haxe
|
|
|
- run: |
|
|
|
- # mkdir ./linuxBinaries
|
|
|
- # curl -sSL https://build.haxe.org/builds/haxe/linux64/haxe_latest.tar.gz -o ./linuxBinaries/haxe_bin.tar.gz
|
|
|
-
|
|
|
- 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 == 'flash9'
|
|
|
- run: export DISPLAY=:99.0
|
|
|
-
|
|
|
- - name: Test
|
|
|
- if: success() && !(matrix.SAUCE && matrix.SAUCE_ACCESS_KEY)
|
|
|
- run: haxe RunCi.hxml
|
|
|
- working-directory: ${{github.workspace}}/tests
|
|
|
-
|
|
|
- - name: Test (with SauceLabs)
|
|
|
- if: matrix.target == 'js' && success() && matrix.SAUCE && matrix.SAUCE_ACCESS_KEY
|
|
|
- run: haxe RunCi.hxml
|
|
|
- working-directory: ${{github.workspace}}/tests
|
|
|
- env:
|
|
|
- SAUCE_ACCESS_KEY: matrix.SAUCE_ACCESS_KEY
|
|
|
-
|
|
|
+ # @import install-neko-linux.yml
|
|
|
+ # @import test-linux.yml
|
|
|
|
|
|
- mac-test:
|
|
|
- needs: mac-build
|
|
|
- runs-on: macos-latest
|
|
|
- env:
|
|
|
- PLATFORM: mac
|
|
|
- TEST: ${{matrix.target}}
|
|
|
- HXCPP_COMPILE_CACHE: ~/hxcache
|
|
|
- strategy:
|
|
|
- fail-fast: false
|
|
|
- matrix:
|
|
|
- target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash9, neko]
|
|
|
- include:
|
|
|
- - target: hl
|
|
|
- BREW_PACKAGES: ninja
|
|
|
- steps:
|
|
|
- - uses: actions/checkout@main
|
|
|
- with:
|
|
|
- submodules: recursive
|
|
|
- - uses: actions/download-artifact@v1
|
|
|
- with:
|
|
|
- name: macBinaries
|
|
|
+ # mac-test:
|
|
|
+ # needs: mac-build
|
|
|
+ # runs-on: macos-latest
|
|
|
+ # env:
|
|
|
+ # PLATFORM: mac
|
|
|
+ # TEST: ${{matrix.target}}
|
|
|
+ # HXCPP_COMPILE_CACHE: ~/hxcache
|
|
|
+ # strategy:
|
|
|
+ # fail-fast: false
|
|
|
+ # matrix:
|
|
|
+ # target: [macro, js, hl, cpp, 'java,jvm', cs, php, python, lua, flash9, neko]
|
|
|
+ # include:
|
|
|
+ # - target: hl
|
|
|
+ # BREW_PACKAGES: ninja
|
|
|
+ # steps:
|
|
|
+ # - uses: actions/checkout@main
|
|
|
+ # with:
|
|
|
+ # submodules: recursive
|
|
|
+ # - uses: actions/download-artifact@v1
|
|
|
+ # with:
|
|
|
+ # name: macBinaries
|
|
|
|
|
|
- - name: Install Neko using homebrew (Mac)
|
|
|
- if: (startsWith(env.PLATFORM, 'mac'))
|
|
|
- run: |
|
|
|
- set -ex
|
|
|
- HOMEBREW_NO_AUTO_UPDATE=1
|
|
|
- brew install neko
|
|
|
-
|
|
|
- - 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 "" > sys/compile-fs.hxml
|
|
|
- haxe RunCi.hxml
|
|
|
- working-directory: ${{github.workspace}}/tests
|
|
|
-
|
|
|
+ # @import install-neko-mac.yml
|
|
|
+ # @import test-mac.yml
|
|
|
|
|
|
- deploy:
|
|
|
- if: github.event_name != 'pull_request'
|
|
|
- needs: [linux-test, mac-test, windows-test, windows64-test]
|
|
|
- runs-on: ubuntu-16.04
|
|
|
- steps:
|
|
|
- # this is only needed for to get `COMMIT_DATE`...
|
|
|
- # maybe https://github.community/t/expose-commit-timestamp-in-the-github-context-data/16460/3
|
|
|
- # would be faster
|
|
|
- - name: Checkout the repository
|
|
|
- uses: actions/checkout@main
|
|
|
+ # deploy:
|
|
|
+ # if: github.event_name != 'pull_request'
|
|
|
+ # needs: [linux-test, mac-test, windows-test, windows64-test]
|
|
|
+ # runs-on: ubuntu-16.04
|
|
|
+ # steps:
|
|
|
+ # # this is only needed for to get `COMMIT_DATE`...
|
|
|
+ # # maybe https://github.community/t/expose-commit-timestamp-in-the-github-context-data/16460/3
|
|
|
+ # # would be faster
|
|
|
+ # - name: Checkout the repository
|
|
|
+ # uses: actions/checkout@main
|
|
|
|
|
|
- - name: Download build artifacts
|
|
|
- uses: actions/download-artifact@v2
|
|
|
+ # - name: Download build artifacts
|
|
|
+ # uses: actions/download-artifact@v2
|
|
|
|
|
|
- - name: Install awscli
|
|
|
- run: |
|
|
|
- set -ex
|
|
|
- sudo apt-get update -qqy
|
|
|
- sudo apt-get install -qqy awscli
|
|
|
+ # - name: Install awscli
|
|
|
+ # run: |
|
|
|
+ # set -ex
|
|
|
+ # sudo apt-get update -qqy
|
|
|
+ # sudo apt-get install -qqy awscli
|
|
|
|
|
|
- # https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
|
|
|
- - name: Extract branch name
|
|
|
- id: extract_branch
|
|
|
- shell: bash
|
|
|
- run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
|
+ # # https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
|
|
|
+ # - name: Extract branch name
|
|
|
+ # id: extract_branch
|
|
|
+ # shell: bash
|
|
|
+ # run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
|
|
|
|
|
|
- - name: Upload binaries
|
|
|
- shell: bash
|
|
|
- env:
|
|
|
- AWS_ACCESS_KEY_ID: ${{ secrets.HXBUILDS_AWS_ACCESS_KEY_ID }}
|
|
|
- AWS_SECRET_ACCESS_KEY: ${{ secrets.HXBUILDS_AWS_SECRET_ACCESS_KEY }}
|
|
|
- HXBUILDS_S3ADDR: ${{ secrets.HXBUILDS_S3ADDR }}/gh-actions-test
|
|
|
- run: |
|
|
|
- set -ex
|
|
|
- COMMIT_HASH_SHORT=${GITHUB_SHA:0:7}
|
|
|
- COMMIT_DATE=`TZ=UTC git show --quiet --date='format-local:%Y-%m-%d' --format="%cd"`
|
|
|
- FILE_NAME=haxe_${COMMIT_DATE}_${{ steps.extract_branch.outputs.branch }}_${COMMIT_HASH_SHORT}
|
|
|
- aws s3 cp linuxBinaries/*_bin.tar.gz ${HXBUILDS_S3ADDR}/haxe/linux64/${FILE_NAME}.tar.gz
|
|
|
- aws s3 cp macBinaries/*_bin.tar.gz ${HXBUILDS_S3ADDR}/haxe/mac/${FILE_NAME}.tar.gz
|
|
|
- aws s3 cp macBinaries/*_installer.tar.gz ${HXBUILDS_S3ADDR}/haxe/mac-installer/${FILE_NAME}.tar.gz
|
|
|
- aws s3 cp win64Binaries/*_bin.zip ${HXBUILDS_S3ADDR}/haxe/windows64/${FILE_NAME}.zip
|
|
|
- aws s3 cp win64Binaries/*_installer.zip ${HXBUILDS_S3ADDR}/haxe/windows64-installer/${FILE_NAME}.zip
|
|
|
- aws s3 cp win64Binaries/*.nupkg ${HXBUILDS_S3ADDR}/haxe/windows64-choco/
|
|
|
- aws s3 cp win32Binaries/*_bin.zip ${HXBUILDS_S3ADDR}/haxe/windows/${FILE_NAME}.zip
|
|
|
- aws s3 cp win32Binaries/*_installer.zip ${HXBUILDS_S3ADDR}/haxe/windows-installer/${FILE_NAME}.zip
|
|
|
- aws s3 cp win32Binaries/*.nupkg ${HXBUILDS_S3ADDR}/haxe/windows-choco/
|
|
|
+ # - name: Upload binaries
|
|
|
+ # shell: bash
|
|
|
+ # env:
|
|
|
+ # AWS_ACCESS_KEY_ID: ${{ secrets.HXBUILDS_AWS_ACCESS_KEY_ID }}
|
|
|
+ # AWS_SECRET_ACCESS_KEY: ${{ secrets.HXBUILDS_AWS_SECRET_ACCESS_KEY }}
|
|
|
+ # HXBUILDS_S3ADDR: ${{ secrets.HXBUILDS_S3ADDR }}/gh-actions-test
|
|
|
+ # run: |
|
|
|
+ # set -ex
|
|
|
+ # COMMIT_HASH_SHORT=${GITHUB_SHA:0:7}
|
|
|
+ # COMMIT_DATE=`TZ=UTC git show --quiet --date='format-local:%Y-%m-%d' --format="%cd"`
|
|
|
+ # FILE_NAME=haxe_${COMMIT_DATE}_${{ steps.extract_branch.outputs.branch }}_${COMMIT_HASH_SHORT}
|
|
|
+ # aws s3 cp linuxBinaries/*_bin.tar.gz ${HXBUILDS_S3ADDR}/haxe/linux64/${FILE_NAME}.tar.gz
|
|
|
+ # aws s3 cp macBinaries/*_bin.tar.gz ${HXBUILDS_S3ADDR}/haxe/mac/${FILE_NAME}.tar.gz
|
|
|
+ # aws s3 cp macBinaries/*_installer.tar.gz ${HXBUILDS_S3ADDR}/haxe/mac-installer/${FILE_NAME}.tar.gz
|
|
|
+ # aws s3 cp win64Binaries/*_bin.zip ${HXBUILDS_S3ADDR}/haxe/windows64/${FILE_NAME}.zip
|
|
|
+ # aws s3 cp win64Binaries/*_installer.zip ${HXBUILDS_S3ADDR}/haxe/windows64-installer/${FILE_NAME}.zip
|
|
|
+ # aws s3 cp win64Binaries/*.nupkg ${HXBUILDS_S3ADDR}/haxe/windows64-choco/
|
|
|
+ # aws s3 cp win32Binaries/*_bin.zip ${HXBUILDS_S3ADDR}/haxe/windows/${FILE_NAME}.zip
|
|
|
+ # aws s3 cp win32Binaries/*_installer.zip ${HXBUILDS_S3ADDR}/haxe/windows-installer/${FILE_NAME}.zip
|
|
|
+ # aws s3 cp win32Binaries/*.nupkg ${HXBUILDS_S3ADDR}/haxe/windows-choco/
|
|
|
|
|
|
- - name: Update "latest"
|
|
|
- if: github.ref == 'refs/heads/development'
|
|
|
- shell: bash
|
|
|
- env:
|
|
|
- AWS_ACCESS_KEY_ID: ${{ secrets.HXBUILDS_AWS_ACCESS_KEY_ID }}
|
|
|
- AWS_SECRET_ACCESS_KEY: ${{ secrets.HXBUILDS_AWS_SECRET_ACCESS_KEY }}
|
|
|
- HXBUILDS_S3ADDR: ${{ secrets.HXBUILDS_S3ADDR }}/gh-actions-test
|
|
|
- run: |
|
|
|
- set -ex
|
|
|
- aws s3 cp linuxBinaries/*_bin.tar.gz ${HXBUILDS_S3ADDR}/haxe/linux64/haxe_latest.tar.gz
|
|
|
- aws s3 cp macBinaries/*_bin.tar.gz ${HXBUILDS_S3ADDR}/haxe/mac/haxe_latest.tar.gz
|
|
|
- aws s3 cp macBinaries/*_installer.tar.gz ${HXBUILDS_S3ADDR}/haxe/mac-installer/haxe_latest.tar.gz
|
|
|
- aws s3 cp win64Binaries/*_bin.zip ${HXBUILDS_S3ADDR}/haxe/windows64/haxe_latest.zip
|
|
|
- aws s3 cp win64Binaries/*_installer.zip ${HXBUILDS_S3ADDR}/haxe/windows64-installer/haxe_latest.zip
|
|
|
- aws s3 cp win32Binaries/*_bin.zip ${HXBUILDS_S3ADDR}/haxe/windows/haxe_latest.zip
|
|
|
- aws s3 cp win32Binaries/*_installer.zip ${HXBUILDS_S3ADDR}/haxe/windows-installer/haxe_latest.zip
|
|
|
+ # - name: Update "latest"
|
|
|
+ # if: github.ref == 'refs/heads/development'
|
|
|
+ # shell: bash
|
|
|
+ # env:
|
|
|
+ # AWS_ACCESS_KEY_ID: ${{ secrets.HXBUILDS_AWS_ACCESS_KEY_ID }}
|
|
|
+ # AWS_SECRET_ACCESS_KEY: ${{ secrets.HXBUILDS_AWS_SECRET_ACCESS_KEY }}
|
|
|
+ # HXBUILDS_S3ADDR: ${{ secrets.HXBUILDS_S3ADDR }}/gh-actions-test
|
|
|
+ # run: |
|
|
|
+ # set -ex
|
|
|
+ # aws s3 cp linuxBinaries/*_bin.tar.gz ${HXBUILDS_S3ADDR}/haxe/linux64/haxe_latest.tar.gz
|
|
|
+ # aws s3 cp macBinaries/*_bin.tar.gz ${HXBUILDS_S3ADDR}/haxe/mac/haxe_latest.tar.gz
|
|
|
+ # aws s3 cp macBinaries/*_installer.tar.gz ${HXBUILDS_S3ADDR}/haxe/mac-installer/haxe_latest.tar.gz
|
|
|
+ # aws s3 cp win64Binaries/*_bin.zip ${HXBUILDS_S3ADDR}/haxe/windows64/haxe_latest.zip
|
|
|
+ # aws s3 cp win64Binaries/*_installer.zip ${HXBUILDS_S3ADDR}/haxe/windows64-installer/haxe_latest.zip
|
|
|
+ # aws s3 cp win32Binaries/*_bin.zip ${HXBUILDS_S3ADDR}/haxe/windows/haxe_latest.zip
|
|
|
+ # aws s3 cp win32Binaries/*_installer.zip ${HXBUILDS_S3ADDR}/haxe/windows-installer/haxe_latest.zip
|
|
|
|
|
|
- # Chocolatey packages have to be named with version number,
|
|
|
- # so let's use web redirection to keep the original file name.
|
|
|
- [[ "$HXBUILDS_S3ADDR" =~ s3://([^/]+)(.*) ]] && HXBUILDS_S3BUCKET="${BASH_REMATCH[1]}" && HXBUILDS_S3PATH="${BASH_REMATCH[2]}"
|
|
|
- [[ `echo win64Binaries/*.nupkg` =~ win64Binaries/(.+) ]] && FILE_NAME="${BASH_REMATCH[1]}"
|
|
|
- aws s3 cp ${HXBUILDS_S3ADDR}/haxe/windows64-choco/${FILE_NAME} ${HXBUILDS_S3ADDR}/haxe/windows64-choco/haxe_latest.nupkg --acl public-read --website-redirect "${HXBUILDS_S3PATH}/haxe/windows64-choco/${FILE_NAME}"
|
|
|
- [[ `echo win32Binaries/*.nupkg` =~ win32Binaries/(.+) ]] && FILE_NAME="${BASH_REMATCH[1]}"
|
|
|
- aws s3 cp ${HXBUILDS_S3ADDR}/haxe/windows-choco/${FILE_NAME} ${HXBUILDS_S3ADDR}/haxe/windows-choco/haxe_latest.nupkg --acl public-read --website-redirect "${HXBUILDS_S3PATH}/haxe/windows-choco/${FILE_NAME}"
|
|
|
+ # # Chocolatey packages have to be named with version number,
|
|
|
+ # # so let's use web redirection to keep the original file name.
|
|
|
+ # [[ "$HXBUILDS_S3ADDR" =~ s3://([^/]+)(.*) ]] && HXBUILDS_S3BUCKET="${BASH_REMATCH[1]}" && HXBUILDS_S3PATH="${BASH_REMATCH[2]}"
|
|
|
+ # [[ `echo win64Binaries/*.nupkg` =~ win64Binaries/(.+) ]] && FILE_NAME="${BASH_REMATCH[1]}"
|
|
|
+ # aws s3 cp ${HXBUILDS_S3ADDR}/haxe/windows64-choco/${FILE_NAME} ${HXBUILDS_S3ADDR}/haxe/windows64-choco/haxe_latest.nupkg --acl public-read --website-redirect "${HXBUILDS_S3PATH}/haxe/windows64-choco/${FILE_NAME}"
|
|
|
+ # [[ `echo win32Binaries/*.nupkg` =~ win32Binaries/(.+) ]] && FILE_NAME="${BASH_REMATCH[1]}"
|
|
|
+ # aws s3 cp ${HXBUILDS_S3ADDR}/haxe/windows-choco/${FILE_NAME} ${HXBUILDS_S3ADDR}/haxe/windows-choco/haxe_latest.nupkg --acl public-read --website-redirect "${HXBUILDS_S3PATH}/haxe/windows-choco/${FILE_NAME}"
|