actions: try neko tests on Windows instead of Ubuntu #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
package-haxelib: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: starling-haxelib | |
path: | | |
./ | |
!lib/ | |
!samples/ | |
!scripts/ | |
!tests/ | |
!haxe-*-*/ | |
!neko-*-*/ | |
!.git/ | |
!webpack.* | |
!package.json | |
if-no-files-found: error | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: krdlab/setup-haxe@v1 | |
with: | |
haxe-version: 4.2.5 | |
- name: Set HAXEPATH | |
run: | | |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV | |
- name: Install Haxe dependencies | |
run: | | |
haxelib install lime --quiet | |
haxelib install openfl --quiet | |
haxelib install dox --quiet | |
haxelib dev starling $GITHUB_WORKSPACE | |
- name: Build docs | |
working-directory: scripts | |
run: | | |
haxe docs.hxml | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: starling-docs | |
path: docs | |
if-no-files-found: error | |
samples: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
haxe-version: [3.4.7, 4.0.5, 4.1.5, 4.2.5, 4.3.2] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: krdlab/setup-haxe@v1 | |
with: | |
haxe-version: ${{ matrix.haxe-version }} | |
- name: Set HAXEPATH | |
run: | | |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV | |
- name: Install Haxe dependencies | |
run: | | |
haxelib install lime --quiet | |
haxelib install openfl --quiet | |
haxelib dev starling $GITHUB_WORKSPACE | |
- name: Build Neko samples | |
run: | | |
haxelib run lime build samples/demo neko | |
haxelib run lime build samples/particle_demo neko | |
- name: Build HTML5 samples | |
run: | | |
haxelib run lime build samples/demo html5 | |
haxelib run lime build samples/particle_demo html5 | |
- name: Build Flash samples | |
run: | | |
haxelib run lime build samples/demo flash | |
haxelib run lime build samples/particle_demo flash | |
- name: Build HashLink samples | |
if: ${{ matrix.haxe-version != '3.4.7' }} | |
run: | | |
haxelib run lime build samples/demo hl | |
haxelib run lime build samples/particle_demo hl | |
build-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Install Dependencies | |
run: | | |
npm install | |
- name: Build Library | |
run: | | |
npm run build | |
- name: Package Library for npm | |
run: | | |
npm pack | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: starling-framework-npm | |
path: starling-framework-*.tgz | |
if-no-files-found: error | |
- name: Build docs | |
run: | | |
npm run build-docs | |
npm-samples: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: krdlab/setup-haxe@v1 | |
with: | |
haxe-version: 4.0.5 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
- name: Set HAXEPATH | |
run: | | |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV | |
- name: Build samples/demo_npm/as3 | |
working-directory: samples/demo_npm/as3 | |
run: | | |
npm install | |
npm run build | |
- name: Build samples/demo_npm/es5 | |
working-directory: samples/demo_npm/es5 | |
run: | | |
npm install | |
npm run build | |
- name: Build samples/demo_npm/es6 | |
working-directory: samples/demo_npm/es6 | |
run: | | |
npm install | |
npm run build | |
- name: Build samples/demo_npm/haxe | |
working-directory: samples/demo_npm/haxe | |
run: | | |
npm install | |
npm run build | |
- name: Build samples/demo_npm/typescript | |
working-directory: samples/demo_npm/typescript | |
run: | | |
npm install | |
npm run build | |
unit-test-neko: | |
strategy: | |
matrix: | |
haxe-version: [4.0.5, 4.1.5, 4.2.5, 4.3.2] | |
# Context3D unavailable error on ubuntu | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: krdlab/setup-haxe@v1 | |
with: | |
haxe-version: ${{ matrix.haxe-version }} | |
- name: Set HAXEPATH | |
run: | | |
echo "HAXEPATH=$Env:HAXE_STD_PATH\.." >> $Env:GITHUB_ENV | |
- name: Install Haxe dependencies | |
run: | | |
haxelib install lime --quiet | |
haxelib install openfl --quiet | |
haxelib install utest --quiet | |
haxelib install hamcrest --quiet | |
- name: Setup environment | |
run: | | |
haxelib dev starling $Env:GITHUB_WORKSPACE | |
- name: Run tests on Neko | |
working-directory: tests | |
run: | | |
haxelib run openfl test neko | |
unit-test-hashlink: | |
strategy: | |
matrix: | |
# HashLink is not supported by Haxe 3 | |
haxe-version: [4.0.5, 4.1.5, 4.2.5, 4.3.2] | |
# AL init fails on both windows and ubuntu | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: krdlab/setup-haxe@v1 | |
with: | |
haxe-version: ${{ matrix.haxe-version }} | |
- name: Set HAXEPATH | |
run: | | |
echo "HAXEPATH=$HAXE_STD_PATH/.." >> $GITHUB_ENV | |
- name: Install Haxe dependencies | |
run: | | |
haxelib install lime --quiet | |
haxelib install openfl --quiet | |
haxelib install utest --quiet | |
haxelib install hamcrest --quiet | |
- name: Setup environment | |
run: | | |
haxelib dev starling $GITHUB_WORKSPACE | |
- name: Run tests on HashLink | |
working-directory: tests | |
run: | | |
haxelib run openfl test hl | |
unit-test-air: | |
strategy: | |
matrix: | |
haxe-version: [3.4.7, 4.0.5, 4.1.5, 4.2.5, 4.3.2] | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: krdlab/setup-haxe@v1 | |
with: | |
haxe-version: ${{ matrix.haxe-version }} | |
- uses: joshtynjala/setup-adobe-air-action@v2 | |
with: | |
air-version: "33.1" | |
accept-license: true | |
- name: Set HAXEPATH | |
run: | | |
echo "HAXEPATH=$Env:HAXE_STD_PATH\.." >> $Env:GITHUB_ENV | |
- name: Install Haxe dependencies | |
run: | | |
haxelib install lime --quiet | |
haxelib install openfl --quiet | |
haxelib install utest --quiet | |
haxelib install hamcrest --quiet | |
haxelib run lime config AIR_SDK ${{ env.AIR_HOME }} | |
- name: Setup environment | |
run: | | |
haxelib dev starling $Env:GITHUB_WORKSPACE | |
- name: Run tests on Adobe AIR | |
working-directory: tests | |
run: | | |
haxelib run openfl test air |