|
| 1 | +# Builds the sample projects on multiple targets to check for compiler errors. |
| 2 | + |
| 3 | +name: Build Samples |
| 4 | + |
| 5 | +on: |
| 6 | + #push: |
| 7 | + pull_request: |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + os: [windows-latest, ubuntu-latest, macos-latest] |
| 15 | + target: [cpp, html5, hl] |
| 16 | + fail-fast: false |
| 17 | + |
| 18 | + runs-on: ${{ matrix.os }} |
| 19 | + |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v6.0.2 |
| 22 | + |
| 23 | + - name: Setup Haxe |
| 24 | + uses: FunkinCrew/ci-haxe@v3 |
| 25 | + with: |
| 26 | + haxe-version: 4.3.7 |
| 27 | + |
| 28 | + - name: Setup HMM |
| 29 | + run: | |
| 30 | + haxelib --global --quiet --never update haxelib |
| 31 | + haxelib --global fixrepo |
| 32 | + haxelib --global --quiet install hmm |
| 33 | + haxelib --global run hmm setup |
| 34 | +
|
| 35 | + - name: Install sample dependencies |
| 36 | + working-directory: ./samples |
| 37 | + run: | |
| 38 | + haxe run.hxml |
| 39 | + hmm install --quiet |
| 40 | + haxelib fixrepo |
| 41 | +
|
| 42 | + - name: Build Flixel Sample |
| 43 | + working-directory: ./samples/flixel |
| 44 | + run: | |
| 45 | + haxelib run lime build ${{ matrix.target }} --no-output |
| 46 | +
|
| 47 | + - name: Build ZIP Flixel Sample |
| 48 | + working-directory: ./samples/flixel_zip |
| 49 | + run: | |
| 50 | + haxelib run lime build ${{ matrix.target }} --no-output |
| 51 | +
|
| 52 | + - name: Build Heaps Sample |
| 53 | + if: matrix.target == 'hl' |
| 54 | + working-directory: ./samples/heaps |
| 55 | + run: | |
| 56 | + haxe hl.hxml |
| 57 | +
|
| 58 | + # - name: Build NME Sample |
| 59 | + # if: matrix.target != 'hl' |
| 60 | + # working-directory: ./samples/nme |
| 61 | + # run: | |
| 62 | + # hmm install --quiet |
| 63 | + # haxelib update |
| 64 | + # echo y | haxelib run nme build ${{ matrix.target }} |
| 65 | + |
| 66 | + - name: Build OpenFL Sample |
| 67 | + working-directory: ./samples/openfl |
| 68 | + run: | |
| 69 | + haxelib run openfl build ${{ matrix.target }} --no-output |
| 70 | +
|
| 71 | + - name: Build OpenFL (Firetongue) Sample |
| 72 | + working-directory: ./samples/openfl_firetongue |
| 73 | + run: | |
| 74 | + haxelib run openfl build ${{ matrix.target }} --no-output |
| 75 | +
|
| 76 | + - name: Build OpenFL (HScript) Sample |
| 77 | + working-directory: ./samples/openfl_hscript |
| 78 | + run: | |
| 79 | + haxelib run openfl build ${{ matrix.target }} --no-output |
| 80 | +
|
| 81 | + - name: Build OpenFL (HScript with Classes) Sample |
| 82 | + working-directory: ./samples/openfl_hscript_class |
| 83 | + run: | |
| 84 | + haxelib run openfl build ${{ matrix.target }} --no-output |
| 85 | +
|
| 86 | +
|
0 commit comments