use git, as 0.5.1 is outdated #17
This file contains hidden or 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: Test Builds | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| windows: | |
| permissions: write-all | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checking Latest Commit | |
| uses: actions/checkout@main | |
| with: | |
| submodules: true | |
| - name: Setup Haxe | |
| uses: krdlab/setup-haxe@master | |
| with: | |
| haxe-version: 4.3.7 | |
| - name: Run Cache | |
| uses: actions/cache@v4.3.0 | |
| with: | |
| # not caching the bin folder to prevent asset duplication and stuff like that | |
| key: windows-build-cache | |
| path: | | |
| .haxelib/ | |
| export/release/windows/haxe/ | |
| export/release/windows/obj/ | |
| restore-keys: windows-build-cache | |
| - name: Install Libraries | |
| run: | | |
| haxelib --global update haxelib | |
| haxelib fixrepo | |
| haxelib install hmm | |
| haxelib run hmm install | |
| - name: Building HXCPP | |
| run: | | |
| cd ./.haxelib/hxcpp/git/tools/hxcpp | |
| haxe compile.hxml | |
| cd ../../../../../ | |
| - name: Compile Engine | |
| run: haxelib run lime build windows | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: Kitty Windows Build | |
| path: export/release/windows/bin | |
| overwrite: true | |
| include-hidden-files: true | |
| if-no-files-found: error | |
| - name: Clearing Cache | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| const caches = await github.rest.actions.getActionsCacheList({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| }) | |
| for (const cache of caches.data.actions_caches) { | |
| if (cache.key == 'windows-build-cache') { | |
| console.log('Clearing ' + cache.key + '...') | |
| await github.rest.actions.deleteActionsCacheById({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| cache_id: cache.id, | |
| }) | |
| console.log('Cache cleared.') | |
| } | |
| } | |
| - name: Run New Cache | |
| uses: actions/cache@v4.3.0 | |
| with: | |
| # not caching the bin folder to prevent asset duplication and stuff like that | |
| key: windows-build-cache | |
| path: | | |
| .haxelib/ | |
| export/release/windows/haxe/ | |
| export/release/windows/obj/ | |
| restore-keys: windows-build-cache | |
| # mac: | |
| # permissions: write-all | |
| # runs-on: macos-15 | |
| # steps: | |
| # - name: Checking Latest Commit | |
| # uses: actions/checkout@main | |
| # with: | |
| # submodules: true | |
| # - name: Setup Haxe | |
| # uses: krdlab/setup-haxe@master | |
| # with: | |
| # haxe-version: 4.3.7 | |
| # - name: Run Cache | |
| # uses: actions/cache@v4.3.0 | |
| # with: | |
| # # not caching the bin folder to prevent asset duplication and stuff like that | |
| # key: mac-build-cache | |
| # path: | | |
| # .haxelib/ | |
| # export/release/mac/haxe/ | |
| # export/release/mac/obj/ | |
| # restore-keys: mac-build-cache | |
| # - name: Install Libraries | |
| # run: | | |
| # haxelib --global update haxelib | |
| # haxelib fixrepo | |
| # haxelib install hmm | |
| # haxelib run hmm install | |
| # - name: Building HXCPP | |
| # run: | | |
| # cd ./.haxelib/hxcpp/git/tools/hxcpp | |
| # haxe compile.hxml | |
| # cd ../../../../../ | |
| # - name: Building the game | |
| # run: haxelib run lime build mac | |
| # - name: Upload Artifact | |
| # uses: actions/upload-artifact@main | |
| # with: | |
| # name: Kitty Mac Build | |
| # path: export/release/macos/bin | |
| # overwrite: true | |
| # include-hidden-files: true | |
| # if-no-files-found: error | |
| # - name: Clearing Cache | |
| # uses: actions/github-script@v6 | |
| # with: | |
| # script: | | |
| # const caches = await github.rest.actions.getActionsCacheList({ | |
| # owner: context.repo.owner, | |
| # repo: context.repo.repo, | |
| # }) | |
| # for (const cache of caches.data.actions_caches) { | |
| # if (cache.key == 'mac-build-cache') { | |
| # console.log('Clearing ' + cache.key + '...') | |
| # await github.rest.actions.deleteActionsCacheById({ | |
| # owner: context.repo.owner, | |
| # repo: context.repo.repo, | |
| # cache_id: cache.id, | |
| # }) | |
| # console.log('Cache cleared.') | |
| # } | |
| # } | |
| # - name: Run New Cache | |
| # uses: actions/cache@v4.3.0 | |
| # with: | |
| # # not caching the bin folder to prevent asset duplication and stuff like that | |
| # key: mac-build-cache | |
| # path: | | |
| # .haxelib/ | |
| # export/release/mac/haxe/ | |
| # export/release/mac/obj/ | |
| # restore-keys: mac-build-cache | |
| # linux: | |
| # permissions: write-all | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checking Latest Commit | |
| # uses: actions/checkout@main | |
| # with: | |
| # submodules: true | |
| # - name: Setup Haxe | |
| # uses: krdlab/setup-haxe@master | |
| # with: | |
| # haxe-version: 4.3.7 | |
| # - name: Run Cache | |
| # uses: actions/cache@v4.3.0 | |
| # with: | |
| # # not caching the bin folder to prevent asset duplication and stuff like that | |
| # key: linux-build-cache | |
| # path: | | |
| # .haxelib/ | |
| # export/release/linux/haxe/ | |
| # export/release/linux/obj/ | |
| # restore-keys: linux-build-cache | |
| # - name: Installing Dependencies | |
| # run: sudo apt-get update && sudo apt-get upgrade && sudo apt-get install libvlc-dev libvlccore-dev vlc-bin vlc libxrandr-dev | |
| # - name: Install Libraries | |
| # run: | | |
| # haxelib --global update haxelib | |
| # haxelib fixrepo | |
| # haxelib install hmm | |
| # haxelib run hmm install | |
| # - name: Building HXCPP | |
| # run: | | |
| # cd ./.haxelib/hxcpp/git/tools/hxcpp | |
| # haxe compile.hxml | |
| # cd ../../../../../ | |
| # - name: Building the game | |
| # run: haxelib run lime build linux | |
| # - name: Upload Artifact | |
| # uses: actions/upload-artifact@main | |
| # with: | |
| # name: Kitty Linux Build | |
| # path: export/release/linux/bin | |
| # overwrite: true | |
| # include-hidden-files: true | |
| # if-no-files-found: error | |
| # - name: Clearing Cache | |
| # uses: actions/github-script@v6 | |
| # with: | |
| # script: | | |
| # const caches = await github.rest.actions.getActionsCacheList({ | |
| # owner: context.repo.owner, | |
| # repo: context.repo.repo, | |
| # }) | |
| # for (const cache of caches.data.actions_caches) { | |
| # if (cache.key == 'linux-build-cache') { | |
| # console.log('Clearing ' + cache.key + '...') | |
| # await github.rest.actions.deleteActionsCacheById({ | |
| # owner: context.repo.owner, | |
| # repo: context.repo.repo, | |
| # cache_id: cache.id, | |
| # }) | |
| # console.log('Cache cleared.') | |
| # } | |
| # } | |
| # - name: Run New Cache | |
| # uses: actions/cache@v4.3.0 | |
| # with: | |
| # # not caching the bin folder to prevent asset duplication and stuff like that | |
| # key: linux-build-cache | |
| # path: | | |
| # .haxelib/ | |
| # export/release/linux/haxe/ | |
| # export/release/linux/obj/ | |
| # restore-keys: linux-build-cache |