From 98fb31f00399f2a2c6aba9dfef697b642bd40268 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Tue, 5 Jan 2021 12:01:46 -0800 Subject: [PATCH] Use action for Android NDK --- .github/workflows/main.yml | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1df87a34..3db5f6502 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,15 +27,10 @@ jobs: with: java-version: 8 - - name: Set environment variables (Linux/macOS) - if: ${{ !startsWith(matrix.os, 'windows-') }} + - name: Install system dependencies (Linux) + if: ${{ startsWith(matrix.os, 'ubuntu-') }} run: | - echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV - - - name: Set environment variables (Windows) - if: ${{ startsWith(matrix.os, 'windows-') }} - run: | - echo "HXCPP_COMPILE_CACHE=C:\.hxcpp" >> $GITHUB_ENV + 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 Haxe dependencies run: | @@ -44,10 +39,15 @@ jobs: haxelib install hxp --quiet haxelib git lime-samples https://github.com/openfl/lime-samples --quiet - - name: Install system dependencies (Linux) - if: ${{ startsWith(matrix.os, 'ubuntu-') }} + - name: Enable HXCPP compile cache (Linux/macOS) + if: ${{ !startsWith(matrix.os, 'windows-') }} 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 + echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV + + - name: Enable HXCPP compile cache (Windows) + if: ${{ startsWith(matrix.os, 'windows-') }} + run: | + echo "HXCPP_COMPILE_CACHE=C:\.hxcpp" >> $GITHUB_ENV - name: Install "lime" command alias (Linux/macOS) if: ${{ !startsWith(matrix.os, 'windows-') }} @@ -64,12 +64,13 @@ jobs: - name: Configure Android support (Linux) if: ${{ startsWith(matrix.os, 'ubuntu-') }} + uses: nttld/setup-ndk@v1 + id: configure-android + with: + ndk-version: r15c run: | - wget -O android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip - unzip -qq android-ndk.zip - rm android-ndk.zip lime config ANDROID_SDK $ANDROID_HOME - lime config ANDROID_NDK_ROOT android-ndk-r15c + lime config ANDROID_NDK_ROOT ${{ steps.configure-android.outputs.ndk-path }} lime config JAVA_HOME $JAVA_HOME lime config ANDROID_SETUP true lime config