From 2ab8588ba3c1f2601f7e87d961a67c58fff38aea Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Tue, 5 Jan 2021 09:56:56 -0800 Subject: [PATCH] Update CI script --- .github/workflows/main.yml | 92 ++++++++++++++------------------------ 1 file changed, 34 insertions(+), 58 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d7477f953..cf4ccacee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,51 +27,29 @@ jobs: with: java-version: 8 - - name: Install Haxelib dependencies + - name: Install Haxe dependencies run: | haxelib install hxcpp 4.0.64 --quiet haxelib install format --quiet haxelib install hxp --quiet haxelib git lime-samples https://github.com/openfl/lime-samples --quiet - - name: Set ANDROID_NDK_ROOT (Linux and macOS) + - name: Configure HXCPP compile cache (Linux/macOS) if: ${{ !startsWith(matrix.os, 'windows-') }} - run: echo "::set-env name=ANDROID_NDK_ROOT::$HOME/Library/lime-dependencies/android-ndk-r15c" + run: | + echo "::set-env name=HXCPP_COMPILE_CACHE::$HOME/.hxcpp" - - name: Set ANDROID_NDK_ROOT (Windows) + - name: Configure HXCPP compile cache (Windows) if: ${{ startsWith(matrix.os, 'windows-') }} - run: echo "::set-env name=ANDROID_NDK_ROOT::C:\android-ndk-r15c" + run: | + echo "::set-env name=HXCPP_COMPILE_CACHE::C:\.hxcpp" - - name: Install Linux dependencies + - name: Install system dependencies (Linux) 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: | - mkdir -p $ANDROID_NDK_ROOT - 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/.. - rm android-ndk.zip - - - name: Install Android NDK r15c (macOS) - if: ${{ startsWith(matrix.os, 'macos-') }} - run: | - mkdir -p $ANDROID_NDK_ROOT - 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/.. - rm android-ndk.zip - - - 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) + - name: Install "lime" command alias (Linux/macOS) if: ${{ !startsWith(matrix.os, 'windows-') }} run: | haxelib dev lime $GITHUB_WORKSPACE @@ -84,25 +62,21 @@ jobs: 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-') }} + - name: Configure Android support (Linux) + if: ${{ startsWith(matrix.os, 'ubuntu-') }} run: | + echo "::set-env name=ANDROID_NDK_ROOT::$HOME/Library/lime-dependencies/android-ndk-r15c" + mkdir -p $ANDROID_NDK_ROOT + 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/.. + rm android-ndk.zip 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: Configure Lime for Android (Windows) - if: ${{ startsWith(matrix.os, 'windows-') }} - run: | - lime config ANDROID_SDK $Env:ANDROID_HOME - haxelib run lime config ANDROID_NDK_ROOT $Env:ANDROID_NDK_ROOT - haxelib run lime config JAVA_HOME $Env:JAVA_HOME - haxelib run lime config ANDROID_SETUP true - haxelib run lime config - - - name: Rebuild Lime Tools + - name: Rebuild Lime tools run: | lime rebuild tools -nocolor -verbose @@ -111,6 +85,7 @@ jobs: lime rebuild hl -release -verbose -nocolor - name: Rebuild Lime (Android) + if: ${{ startsWith(matrix.os, 'ubuntu-') }} run: | lime rebuild android -release -verbose -nocolor @@ -136,13 +111,13 @@ jobs: lime rebuild windows -32 -release -verbose -nocolor lime rebuild windows -64 -release -verbose -nocolor - - name: Create Lime Samples + - 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) + - name: Build Lime samples (HTML5) run: | lime build HelloWorld html5 -release -verbose -nocolor lime build HelloWorld html5 -Dcanvas -release -verbose -nocolor @@ -154,53 +129,54 @@ jobs: lime build SimpleAudio html5 -Dcanvas -release -verbose -nocolor lime build SimpleAudio html5 -Ddom -release -verbose -nocolor - - name: Build Lime Samples (flash) + - 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) + - 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 (HashLink) + # 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) + - name: Build Lime samples (Android) + if: ${{ startsWith(matrix.os, 'ubuntu-') }} 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) + - 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) + - name: Build Lime samples (macOS) 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) + - 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) + - name: Build Lime samples (Windows) if: ${{ startsWith(matrix.os, 'windows-') }} run: | lime build HelloWorld windows -release -verbose -nocolor