Github Actions: also compiles some samples for a bunch of platforms
Currently, does not include iOS, but I plan to add that later
This commit is contained in:
committed by
Joshua Granick
parent
0baab76e42
commit
a2e1962336
254
.github/workflows/main.yml
vendored
254
.github/workflows/main.yml
vendored
@@ -4,15 +4,14 @@ on: [push]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build-linux:
|
build:
|
||||||
runs-on: ubuntu-16.04
|
|
||||||
|
|
||||||
env:
|
|
||||||
ANDROID_NDK_ROOT: /opt/android-ndk-r15c
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
haxe-version: [3.4.7, 4.0.5, 4.1.1]
|
haxe-version: [3.4.7, 4.0.5, 4.1.1]
|
||||||
|
os: [ubuntu-16.04, macos-latest, windows-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -25,81 +24,63 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: 8
|
java-version: 8
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install Haxelib dependencies
|
||||||
run: |
|
run: |
|
||||||
haxelib install hxcpp --quiet
|
haxelib install hxcpp 4.0.64 --quiet
|
||||||
haxelib install format --quiet
|
haxelib install format --quiet
|
||||||
haxelib install hxp --quiet
|
haxelib install hxp --quiet
|
||||||
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev g++-multilib gcc-multilib libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev
|
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
|
||||||
|
|
||||||
- name: Install Android NDK
|
- name: Set ANDROID_NDK_ROOT (Linux and macOS)
|
||||||
|
if: ${{ !startsWith(matrix.os, 'windows-') }}
|
||||||
|
run: echo "::set-env name=ANDROID_NDK_ROOT::/opt/android-ndk-r15c"
|
||||||
|
|
||||||
|
- name: Set ANDROID_NDK_ROOT (Windows)
|
||||||
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
||||||
|
run: echo "::set-env name=ANDROID_NDK_ROOT::C:\android-ndk-r15c"
|
||||||
|
|
||||||
|
- name: Install Linux dependencies
|
||||||
|
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
|
||||||
|
run: sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev g++-multilib gcc-multilib libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev
|
||||||
|
|
||||||
|
- name: Install Android NDK (Linux)
|
||||||
|
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
|
||||||
run: |
|
run: |
|
||||||
mkdir $ANDROID_NDK_ROOT
|
mkdir $ANDROID_NDK_ROOT
|
||||||
wget -O android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
|
wget -O android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
|
||||||
unzip -qq android-ndk.zip -d $ANDROID_NDK_ROOT/..
|
unzip -qq android-ndk.zip -d $ANDROID_NDK_ROOT/..
|
||||||
rm android-ndk.zip
|
rm android-ndk.zip
|
||||||
|
|
||||||
- name: Install "lime" command alias
|
- name: Install Android NDK r15c (macOS)
|
||||||
run: |
|
if: ${{ startsWith(matrix.os, 'macos-') }}
|
||||||
haxelib dev lime $GITHUB_WORKSPACE
|
|
||||||
haxelib run lime setup -alias -y
|
|
||||||
|
|
||||||
- name: Configure Lime for Android
|
|
||||||
run: |
|
|
||||||
lime config ANDROID_SDK $ANDROID_HOME
|
|
||||||
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_ROOT
|
|
||||||
haxelib run lime config JAVA_HOME $JAVA_HOME
|
|
||||||
haxelib run lime config ANDROID_SETUP true
|
|
||||||
haxelib run lime config
|
|
||||||
|
|
||||||
- name: Rebuild Lime tools
|
|
||||||
run: |
|
|
||||||
lime rebuild tools -nocolor -verbose
|
|
||||||
|
|
||||||
- name: Rebuild Lime binaries
|
|
||||||
run: |
|
|
||||||
lime rebuild linux -64 -release -verbose -nocolor
|
|
||||||
lime rebuild linux -32 -release -verbose -nocolor
|
|
||||||
lime rebuild hl -64 -release -verbose -nocolor
|
|
||||||
lime rebuild android -release -verbose -nocolor
|
|
||||||
|
|
||||||
build-macos:
|
|
||||||
runs-on: macos-latest
|
|
||||||
|
|
||||||
env:
|
|
||||||
ANDROID_NDK_ROOT: /opt/android-ndk-r15c
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
haxe-version: [3.4.7, 4.0.5, 4.1.1]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- uses: haxeui/haxeui-core/.github/actions/haxe@master
|
|
||||||
with:
|
|
||||||
haxe-version: ${{ matrix.haxe-version }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
haxelib install hxcpp --quiet
|
|
||||||
haxelib install format --quiet
|
|
||||||
haxelib install hxp --quiet
|
|
||||||
|
|
||||||
- name: Install Android NDK r15c
|
|
||||||
run: |
|
run: |
|
||||||
mkdir $ANDROID_NDK_ROOT
|
mkdir $ANDROID_NDK_ROOT
|
||||||
wget -O android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-r15c-darwin-x86_64.zip
|
wget -O android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-r15c-darwin-x86_64.zip
|
||||||
unzip -qq android-ndk.zip -d $ANDROID_NDK_ROOT/..
|
unzip -qq android-ndk.zip -d $ANDROID_NDK_ROOT/..
|
||||||
rm android-ndk.zip
|
rm android-ndk.zip
|
||||||
|
|
||||||
- name: Install "lime" command alias
|
- name: Install Android NDK r15c (Windows)
|
||||||
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
||||||
|
run: |
|
||||||
|
mkdir $Env:ANDROID_NDK_ROOT
|
||||||
|
Invoke-WebRequest https://dl.google.com/android/repository/android-ndk-r15c-windows-x86_64.zip -OutFile android-ndk.zip
|
||||||
|
Expand-Archive android-ndk.zip -DestinationPath $Env:ANDROID_NDK_ROOT/..
|
||||||
|
rm android-ndk.zip
|
||||||
|
|
||||||
|
- name: Install "lime" command alias (Linux and macOS)
|
||||||
|
if: ${{ !startsWith(matrix.os, 'windows-') }}
|
||||||
run: |
|
run: |
|
||||||
haxelib dev lime $GITHUB_WORKSPACE
|
haxelib dev lime $GITHUB_WORKSPACE
|
||||||
haxelib run lime setup -alias -y
|
haxelib run lime setup -alias -y
|
||||||
|
|
||||||
- name: Configure Lime for Android
|
- name: Install "lime" command alias (Windows)
|
||||||
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
||||||
|
run: |
|
||||||
|
haxelib dev lime $Env:GITHUB_WORKSPACE
|
||||||
|
haxelib run lime setup -alias -y
|
||||||
|
|
||||||
|
- name: Configure Lime for Android (Linux and macOS)
|
||||||
|
if: ${{ !startsWith(matrix.os, 'windows-') }}
|
||||||
run: |
|
run: |
|
||||||
lime config ANDROID_SDK $ANDROID_HOME
|
lime config ANDROID_SDK $ANDROID_HOME
|
||||||
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_ROOT
|
haxelib run lime config ANDROID_NDK_ROOT $ANDROID_NDK_ROOT
|
||||||
@@ -107,54 +88,8 @@ jobs:
|
|||||||
haxelib run lime config ANDROID_SETUP true
|
haxelib run lime config ANDROID_SETUP true
|
||||||
haxelib run lime config
|
haxelib run lime config
|
||||||
|
|
||||||
- name: Rebuild Lime tools
|
- name: Configure Lime for Android (Windows)
|
||||||
run: |
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
||||||
lime rebuild tools -nocolor -verbose
|
|
||||||
|
|
||||||
- name: Rebuild Lime binaries
|
|
||||||
run: |
|
|
||||||
lime rebuild mac -release -verbose -nocolor
|
|
||||||
lime rebuild hl -release -verbose -nocolor
|
|
||||||
lime rebuild ios -release -verbose -nocolor
|
|
||||||
lime rebuild android -release -verbose -nocolor
|
|
||||||
|
|
||||||
build-windows:
|
|
||||||
runs-on: windows-latest
|
|
||||||
|
|
||||||
env:
|
|
||||||
ANDROID_NDK_ROOT: C:\android-ndk-r15c
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
haxe-version: [3.4.7, 4.0.5, 4.1.1]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- uses: haxeui/haxeui-core/.github/actions/haxe@master
|
|
||||||
with:
|
|
||||||
haxe-version: ${{ matrix.haxe-version }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
haxelib install hxcpp --quiet
|
|
||||||
haxelib install format --quiet
|
|
||||||
haxelib install hxp --quiet
|
|
||||||
|
|
||||||
- name: Install Android NDK r15c
|
|
||||||
run: |
|
|
||||||
mkdir $Env:ANDROID_NDK_ROOT
|
|
||||||
Invoke-WebRequest https://dl.google.com/android/repository/android-ndk-r15c-windows-x86_64.zip -OutFile android-ndk.zip
|
|
||||||
Expand-Archive android-ndk.zip -DestinationPath $Env:ANDROID_NDK_ROOT/..
|
|
||||||
rm android-ndk.zip
|
|
||||||
|
|
||||||
- name: Install "lime" command alias
|
|
||||||
run: |
|
|
||||||
haxelib dev lime $Env:GITHUB_WORKSPACE
|
|
||||||
haxelib run lime setup -alias -y
|
|
||||||
|
|
||||||
- name: Configure Lime for Android
|
|
||||||
run: |
|
run: |
|
||||||
lime config ANDROID_SDK $Env:ANDROID_HOME
|
lime config ANDROID_SDK $Env:ANDROID_HOME
|
||||||
haxelib run lime config ANDROID_NDK_ROOT $Env:ANDROID_NDK_ROOT
|
haxelib run lime config ANDROID_NDK_ROOT $Env:ANDROID_NDK_ROOT
|
||||||
@@ -162,13 +97,108 @@ jobs:
|
|||||||
haxelib run lime config ANDROID_SETUP true
|
haxelib run lime config ANDROID_SETUP true
|
||||||
haxelib run lime config
|
haxelib run lime config
|
||||||
|
|
||||||
- name: Rebuild Lime tools
|
- name: Rebuild Lime Tools
|
||||||
run: |
|
run: |
|
||||||
lime rebuild tools -nocolor -verbose
|
lime rebuild tools -nocolor -verbose
|
||||||
|
|
||||||
- name: Rebuild Lime binaries
|
- name: Rebuild Lime (HashLink)
|
||||||
|
run: |
|
||||||
|
lime rebuild hl -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Rebuild Lime (Android)
|
||||||
|
run: |
|
||||||
|
lime rebuild android -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Rebuild Lime (iOS)
|
||||||
|
if: ${{ startsWith(matrix.os, 'macos-') }}
|
||||||
|
run: |
|
||||||
|
lime rebuild ios -release -verbose -nocolor
|
||||||
|
lime rebuild ios -simulator -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Rebuild Lime (Linux)
|
||||||
|
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
|
||||||
|
run: |
|
||||||
|
lime rebuild linux -64 -release -verbose -nocolor
|
||||||
|
lime rebuild linux -32 -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Rebuild Lime (macOS)
|
||||||
|
if: ${{ startsWith(matrix.os, 'macos-') }}
|
||||||
|
run: |
|
||||||
|
lime rebuild mac -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Rebuild Lime (Windows)
|
||||||
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
||||||
run: |
|
run: |
|
||||||
lime rebuild windows -32 -release -verbose -nocolor
|
lime rebuild windows -32 -release -verbose -nocolor
|
||||||
lime rebuild windows -64 -release -verbose -nocolor
|
lime rebuild windows -64 -release -verbose -nocolor
|
||||||
lime rebuild hl -32 -release -verbose -nocolor
|
|
||||||
lime rebuild android -release -verbose -nocolor
|
- name: Create Lime Samples
|
||||||
|
run: |
|
||||||
|
lime create HelloWorld -verbose -nocolor
|
||||||
|
lime create SimpleImage -verbose -nocolor
|
||||||
|
lime create SimpleAudio -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Build Lime Samples (html5)
|
||||||
|
run: |
|
||||||
|
lime build HelloWorld html5 -release -verbose -nocolor
|
||||||
|
lime build HelloWorld html5 -Dcanvas -release -verbose -nocolor
|
||||||
|
lime build HelloWorld html5 -Ddom -release -verbose -nocolor
|
||||||
|
lime build SimpleImage html5 -release -verbose -nocolor
|
||||||
|
lime build SimpleImage html5 -Dcanvas -release -verbose -nocolor
|
||||||
|
lime build SimpleImage html5 -Ddom -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio html5 -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio html5 -Dcanvas -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio html5 -Ddom -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Build Lime Samples (flash)
|
||||||
|
run: |
|
||||||
|
lime build HelloWorld flash -release -verbose -nocolor
|
||||||
|
lime build SimpleImage flash -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio flash -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Build Lime Samples (neko)
|
||||||
|
run: |
|
||||||
|
lime build HelloWorld neko -release -verbose -nocolor
|
||||||
|
lime build SimpleImage neko -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio neko -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Build Lime Samples (hl)
|
||||||
|
if: ${{ !startsWith(matrix.haxe-version, '3.') }}
|
||||||
|
run: |
|
||||||
|
lime build HelloWorld hl -release -verbose -nocolor
|
||||||
|
lime build SimpleImage hl -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio hl -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Build Lime Samples (android)
|
||||||
|
run: |
|
||||||
|
lime build HelloWorld android -release -verbose -nocolor
|
||||||
|
lime build SimpleImage android -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio android -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Build Lime Samples (linux)
|
||||||
|
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
|
||||||
|
run: |
|
||||||
|
lime build HelloWorld linux -release -verbose -nocolor
|
||||||
|
lime build SimpleImage linux -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio linux -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Build Lime Samples (mac)
|
||||||
|
if: ${{ startsWith(matrix.os, 'macos-') }}
|
||||||
|
run: |
|
||||||
|
lime build HelloWorld mac -release -verbose -nocolor
|
||||||
|
lime build SimpleImage mac -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio mac -release -verbose -nocolor
|
||||||
|
|
||||||
|
#- name: Build Lime Samples (ios)
|
||||||
|
# if: ${{ startsWith(matrix.os, 'macos-') }}
|
||||||
|
# run: |
|
||||||
|
# lime build HelloWorld ios -simulator -release -verbose -nocolor
|
||||||
|
# lime build SimpleImage ios -simulator -release -verbose -nocolor
|
||||||
|
# lime build SimpleAudio ios -simulator -release -verbose -nocolor
|
||||||
|
|
||||||
|
- name: Build Lime Samples (windows)
|
||||||
|
if: ${{ startsWith(matrix.os, 'windows-') }}
|
||||||
|
run: |
|
||||||
|
lime build HelloWorld windows -release -verbose -nocolor
|
||||||
|
lime build SimpleImage windows -release -verbose -nocolor
|
||||||
|
lime build SimpleAudio windows -release -verbose -nocolor
|
||||||
Reference in New Issue
Block a user