Divide CI action into multiple jobs to reduce length of each run

This commit is contained in:
Joshua Granick
2021-01-06 11:12:57 -08:00
parent c6fe645ab8
commit 0f07a3a91c

View File

@@ -1,124 +1,508 @@
name: CI
on: [push, pull_request]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
jobs:
build:
android:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haxeui/haxeui-core/.github/actions/haxe@master
with:
haxe-version: 4.1.5
- uses: actions/setup-java@v1
with:
java-version: 8
- name: Install system dependencies
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 Haxe dependencies
run: |
haxelib install hxcpp --quiet
haxelib install format --quiet
haxelib install hxp --quiet
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Enable HXCPP compile cache
run: |
echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV
- name: Install Android NDK
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r15c
- name: Rebuild Lime tools
run: |
haxelib dev lime $GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
haxelib run lime rebuild linux -64 -release -nocolor -verbose -nocffi
- name: Install "lime" command alias
run: |
haxelib run lime setup -alias -y -nocffi
lime || alias lime="haxelib run lime"
- name: Configure Android support
run: |
lime config ANDROID_SDK $ANDROID_HOME
lime config ANDROID_NDK_ROOT ${{ steps.setup-ndk.outputs.ndk-path }}
lime config JAVA_HOME $JAVA_HOME
lime config ANDROID_SETUP true
lime config
- name: Rebuild Lime
run: |
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
run: |
lime build HelloWorld android -release -verbose -nocolor
lime build SimpleImage android -release -verbose -nocolor
lime build SimpleAudio android -release -verbose -nocolor
flash:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haxeui/haxeui-core/.github/actions/haxe@master
with:
haxe-version: 4.1.5
- name: Install system dependencies
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 Haxe dependencies
run: |
haxelib install hxcpp --quiet
haxelib install format --quiet
haxelib install hxp --quiet
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Rebuild Lime tools
run: |
haxelib dev lime $GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
haxelib run lime rebuild linux -64 -release -nocolor -verbose -nocffi
- name: Install "lime" command alias
run: |
haxelib run lime setup -alias -y -nocffi
lime || alias lime="haxelib run lime"
- name: Create Lime samples
run: |
lime create HelloWorld -verbose -nocolor
lime create SimpleImage -verbose -nocolor
lime create SimpleAudio -verbose -nocolor
- name: Build Lime samples
run: |
lime build HelloWorld flash -release -verbose -nocolor
lime build SimpleImage flash -release -verbose -nocolor
lime build SimpleAudio flash -release -verbose -nocolor
hashlink:
strategy:
matrix:
haxe-version: [3.4.7, 4.1.5]
os: [ubuntu-16.04, macos-10.15, windows-latest]
runs-on: ${{ matrix.os }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haxeui/haxeui-core/.github/actions/haxe@master
with:
haxe-version: 4.1.5
- 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 Haxe dependencies
run: |
haxelib install hxcpp --quiet
haxelib install format --quiet
haxelib install hxp --quiet
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Rebuild Lime tools (Windows)
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
haxelib dev lime $Env:GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
- name: Rebuild Lime tools (macOS/Linux)
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: |
haxelib dev lime $GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
- name: Install "lime" command alias (Windows)
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
haxelib run lime setup -alias -y -nocffi
- name: Install "lime" command alias (macOS/Linux)
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: |
haxelib run lime setup -alias -y -nocffi
lime || alias lime="haxelib run lime"
- name: Rebuild Lime
run: |
lime rebuild hl -release -verbose -nocolor -nocffi
#- 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
html5:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haxeui/haxeui-core/.github/actions/haxe@master
with:
haxe-version: 4.1.5
- name: Install system dependencies
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 Haxe dependencies
run: |
haxelib install hxcpp --quiet
haxelib install format --quiet
haxelib install hxp --quiet
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Rebuild Lime tools
run: |
haxelib dev lime $GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
haxelib run lime rebuild linux -64 -release -nocolor -verbose -nocffi
- name: Install "lime" command alias
run: |
haxelib run lime setup -alias -y -nocffi
lime || alias lime="haxelib run lime"
- name: Create Lime samples
run: |
lime create HelloWorld -verbose -nocolor
lime create SimpleImage -verbose -nocolor
lime create SimpleAudio -verbose -nocolor
- name: Build Lime samples
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
ios:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haxeui/haxeui-core/.github/actions/haxe@master
with:
haxe-version: 4.1.5
- name: Install Haxe dependencies
run: |
git clone https://github.com/haxefoundation/hxcpp
haxelib dev hxcpp hxcpp
cd hxcpp/tools/hxcpp
haxe compile.hxml
haxelib install format --quiet
haxelib install hxp --quiet
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Enable HXCPP compile cache
run: |
echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV
- name: Rebuild Lime tools
run: |
haxelib dev lime $GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
haxelib run lime rebuild macos -release -64 -nocolor -verbose -nocffi
- name: Install "lime" command alias
run: |
haxelib run lime setup -alias -y -nocffi
lime || alias lime="haxelib run lime"
- name: Rebuild Lime
run: |
lime rebuild ios -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
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
linux:
runs-on: ubuntu-16.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haxeui/haxeui-core/.github/actions/haxe@master
with:
haxe-version: 4.1.5
- name: Install system dependencies
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 Haxe dependencies
run: |
haxelib install hxcpp --quiet
haxelib install format --quiet
haxelib install hxp --quiet
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Enable HXCPP compile cache
run: |
echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV
- name: Rebuild Lime tools
run: |
haxelib dev lime $GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
- name: Install "lime" command alias
run: |
haxelib run lime setup -alias -y -nocffi
lime || alias lime="haxelib run lime"
- name: Rebuild Lime
run: |
lime rebuild linux -64 -release -verbose -nocolor
lime rebuild linux -32 -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
run: |
lime build HelloWorld linux -release -verbose -nocolor
lime build SimpleImage linux -release -verbose -nocolor
lime build SimpleAudio linux -release -verbose -nocolor
macos:
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haxeui/haxeui-core/.github/actions/haxe@master
with:
haxe-version: 4.1.5
- name: Install Haxe dependencies
run: |
haxelib install hxcpp --quiet
haxelib install format --quiet
haxelib install hxp --quiet
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Enable HXCPP compile cache
run: |
echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV
- name: Rebuild Lime tools
run: |
haxelib dev lime $GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
- name: Install "lime" command alias
run: |
haxelib run lime setup -alias -y -nocffi
lime || alias lime="haxelib run lime"
- name: Rebuild Lime
run: |
lime rebuild macos -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
run: |
lime build HelloWorld macos -release -verbose -nocolor
lime build SimpleImage macos -release -verbose -nocolor
lime build SimpleAudio macos -release -verbose -nocolor
neko:
strategy:
matrix:
os: [ubuntu-16.04, macos-10.15, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haxeui/haxeui-core/.github/actions/haxe@master
with:
haxe-version: 4.1.5
- 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 Haxe dependencies
run: |
haxelib install hxcpp --quiet
haxelib install format --quiet
haxelib install hxp --quiet
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Rebuild Lime tools (Windows)
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
haxelib dev lime $Env:GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
- name: Rebuild Lime tools (macOS/Linux)
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: |
haxelib dev lime $GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
- name: Install "lime" command alias (Windows)
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
haxelib run lime setup -alias -y -nocffi
- name: Install "lime" command alias (macOS/Linux)
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: |
haxelib run lime setup -alias -y -nocffi
lime || alias lime="haxelib run lime"
- name: Rebuild Lime (Windows)
if: ${{ startsWith(matrix.os, 'windows-') }}
run: |
lime rebuild windows -64 -release -verbose -nocolor
- name: Rebuild Lime (macOS)
if: ${{ startsWith(matrix.os, 'macos-') }}
run: |
lime rebuild mac -release -verbose -nocolor
- name: Rebuild Lime (Linux)
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
lime rebuild linux -64 -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
run: |
lime build HelloWorld neko -release -verbose -nocolor
lime build SimpleImage neko -release -verbose -nocolor
lime build SimpleAudio neko -release -verbose -nocolor
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: haxeui/haxeui-core/.github/actions/haxe@master
with:
haxe-version: ${{ matrix.haxe-version }}
- uses: actions/setup-java@v1
with:
java-version: 8
- name: Linux | Install system 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
haxe-version: 4.1.5
- name: Install Haxe dependencies
run: |
git clone https://github.com/haxefoundation/hxcpp
haxelib dev hxcpp hxcpp
cd hxcpp/tools/hxcpp
haxe compile.hxml
haxelib install hxcpp --quiet
haxelib install format --quiet
haxelib install hxp --quiet
haxelib git lime-samples https://github.com/openfl/lime-samples --quiet
- name: Windows | Enable HXCPP compile cache
if: ${{ startsWith(matrix.os, 'windows-') }}
- name: Enable HXCPP compile cache
run: |
echo "HXCPP_COMPILE_CACHE=C:\.hxcpp" >> $GITHUB_ENV
- name: Linux/macOS | Enable HXCPP compile cache
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: |
echo "HXCPP_COMPILE_CACHE=~/.hxcpp" >> $GITHUB_ENV
- name: Linux | Install Android NDK
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r15c
- name: Windows | Rebuild Lime tools
if: ${{ startsWith(matrix.os, 'windows-') }}
- name: Rebuild Lime tools
run: |
haxelib dev lime $Env:GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
- name: Linux/macOS | Rebuild Lime tools
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: |
haxelib dev lime $GITHUB_WORKSPACE
haxelib run lime rebuild tools -nocolor -verbose -nocffi
- name: Windows | Install "lime" command alias
if: ${{ startsWith(matrix.os, 'windows-') }}
- name: Install "lime" command alias
run: |
haxelib run lime setup -alias -y -nocffi
- name: Linux/macOS | Install "lime" command alias
if: ${{ !startsWith(matrix.os, 'windows-') }}
run: |
haxelib run lime setup -alias -y -nocffi
lime || alias lime="haxelib run lime"
- name: Linux | Configure Android support
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
lime config ANDROID_SDK $ANDROID_HOME
lime config ANDROID_NDK_ROOT ${{ steps.setup-ndk.outputs.ndk-path }}
lime config JAVA_HOME $JAVA_HOME
lime config ANDROID_SETUP true
lime config
- name: Rebuild Lime (HashLink)
run: |
lime rebuild hl -release -verbose -nocolor
- name: Rebuild Lime (Android)
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
lime rebuild android -release -verbose -nocolor
- name: Rebuild Lime (iOS)
if: ${{ startsWith(matrix.os, 'macos-') }}
run: |
lime rebuild ios -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-') }}
- name: Rebuild Lime
run: |
lime rebuild windows -32 -release -verbose -nocolor
lime rebuild windows -64 -release -verbose -nocolor
@@ -129,69 +513,31 @@ jobs:
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 (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)
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)
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 (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)
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-') }}
- name: Build Lime samples
run: |
lime build HelloWorld windows -release -verbose -nocolor
lime build SimpleImage windows -release -verbose -nocolor
lime build SimpleAudio windows -release -verbose -nocolor
notify-discord:
if: always()
needs: [android, flash, hashlink, html5, ios, linux, macos, neko, windows]
steps:
- name: Notify Discord (success)
uses: appleboy/discord-action@master
if: github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#00C07F"
message: "<a href="https://github.com/haxelime/lime/actions/runs/${{ GITHUB_RUN_ID }}">CI build succeeded.</a>"
- name: Notify Discord (failure)
uses: appleboy/discord-action@master
if: failure() && (github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name)
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#FF6562"
message: "https://github.com/haxelime/lime/actions/runs/${{ GITHUB_RUN_ID }}\nCI build failed."