diff --git a/.github/workflows/build-samples.yml b/.github/workflows/build-samples.yml new file mode 100644 index 00000000..0153a921 --- /dev/null +++ b/.github/workflows/build-samples.yml @@ -0,0 +1,89 @@ +# Builds the sample projects on multiple targets to check for compiler errors. + +name: Build Samples + +on: + #push: + pull_request: + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + os: [windows-latest, ubuntu-latest, macos-latest] + target: [cpp, html5, hl] + fail-fast: false + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v6.0.2 + + - name: Setup Haxe + uses: FunkinCrew/ci-haxe@v3 + with: + haxe-version: 4.3.7 + + - name: Setup HMM + # Workaround for an error on the Windows target + #env: + # HAXEPATH: ${{ env.HAXE_STD_PATH }}/.. + run: | + haxelib --global --quiet install hmm + haxelib --global run hmm setup + + - name: Install sample dependencies + shell: bash + run: | + for sample in samples/*; do + if [ -d "$sample" ] && [ -f "$sample/hmm.json" ]; then + echo "Installing dependencies for $sample" + (cd "$sample" && haxelib run hmm install --quiet) + fi + done + + - name: Build Flixel Sample + working-directory: ./samples/flixel + run: | + haxelib run lime build ${{ matrix.target }} --no-output + + - name: Build ZIP Flixel Sample + working-directory: ./samples/flixel_zip + run: | + haxelib run lime build ${{ matrix.target }} --no-output + + - name: Build Heaps Sample + if: matrix.target == 'hl' + working-directory: ./samples/heaps + run: | + haxe hl.hxml + + - name: Build NME Sample + if: matrix.target != 'hl' + working-directory: ./samples/nme + run: | + haxelib update --always --quiet + echo y | haxelib run nme build ${{ matrix.target }} + + - name: Build OpenFL Sample + working-directory: ./samples/openfl + run: | + haxelib run openfl build ${{ matrix.target }} --no-output + + - name: Build OpenFL (Firetongue) Sample + working-directory: ./samples/openfl_firetongue + run: | + haxelib run lime build ${{ matrix.target }} --no-output + + - name: Build OpenFL (HScript) Sample + working-directory: ./samples/openfl_hscript + run: | + haxelib run openfl build ${{ matrix.target }} --no-output + + - name: Build OpenFL (HScript with Classes) Sample + working-directory: ./samples/openfl_hscript_class + run: | + haxelib run openfl build ${{ matrix.target }} --no-output + + diff --git a/include.xml b/include.xml index e28dae2b..9e3d2b98 100644 --- a/include.xml +++ b/include.xml @@ -1,6 +1,9 @@ + + +