name: build-upload on: workflow_dispatch: push: jobs: create-nightly-html5: runs-on: [self-hosted, linux] container: ubuntu:23.10 steps: - name: prepare container run: | apt update apt install sudo git curl unzip -y git config --global --add safe.directory $GITHUB_WORKSPACE - name: get token from gh app uses: actions/create-github-app-token@v1 id: app_token with: app-id: ${{ vars.APP_ID }} private-key: ${{ secrets.APP_PEM }} owner: ${{ github.repository_owner }} - name: checkout repo uses: funkincrew/ci-checkout@v6 with: submodules: 'recursive' token: ${{ steps.app_token.outputs.token }} - uses: ./.github/actions/setup-haxeshit - name: gather game dependencies run: | sudo apt-get install -y libx11-dev xorg-dev libgl-dev libxi-dev libxext-dev libasound2-dev libxinerama-dev libxrandr-dev libgl1-mesa-dev - name: build game run: | haxelib run lime build html5 -release --times -DGITHUB_BUILD ls - uses: ./.github/actions/upload-itch with: butler-key: ${{ secrets.BUTLER_API_KEY}} build-dir: export/release/html5/bin target: html5 create-nightly-win: runs-on: [self-hosted, windows] steps: - name: get token from gh app uses: actions/create-github-app-token@v1 id: app_token with: app-id: ${{ vars.APP_ID }} private-key: ${{ secrets.APP_PEM }} owner: ${{ github.repository_owner }} - name: checkout repo uses: funkincrew/ci-checkout@v6 with: submodules: 'recursive' token: ${{ steps.app_token.outputs.token }} - uses: ./.github/actions/setup-haxeshit - name: Make HXCPP cache dir run: | mkdir -p ${{ runner.temp }}\hxcpp_cache - name: Restore build cache id: cache-build-win uses: actions/cache@v4 with: path: | .haxelib export ${{ runner.temp }}\hxcpp_cache key: ${{ runner.os }}-build-win-${{ github.ref_name }}-${{ hashFiles('**/hmm.json') }} - name: build game run: | haxelib run lime build windows -release -DNO_REDIRECT_ASSETS_FOLDER -DGITHUB_BUILD dir env: HXCPP_COMPILE_CACHE: "${{ runner.temp }}\\hxcpp_cache" - uses: ./.github/actions/upload-itch with: butler-key: ${{ secrets.BUTLER_API_KEY }} build-dir: export/release/windows/bin target: win create-nightly-mac: runs-on: [self-hosted, macos] steps: - name: prepare container run: | git config --global --add safe.directory $GITHUB_WORKSPACE - name: get token from gh app uses: actions/create-github-app-token@v1 id: app_token with: app-id: ${{ vars.APP_ID }} private-key: ${{ secrets.APP_PEM }} owner: ${{ github.repository_owner }} - name: checkout repo uses: funkincrew/ci-checkout@v6 with: submodules: 'recursive' token: ${{ steps.app_token.outputs.token }} - uses: ./.github/actions/setup-haxeshit - name: Make HXCPP cache dir run: | mkdir -p ${{ runner.temp }}/hxcpp_cache - name: restore build cache id: cache-build-win uses: actions/cache@v4 with: path: | .haxelib export ${{ runner.temp }}/hxcpp_cache key: ${{ runner.os }}-build-mac-${{ github.ref_name }}-${{ hashFiles('**/hmm.json') }} - name: Build game run: | haxelib run lime build macos -release --times -DGITHUB_BUILD ls env: HXCPP_COMPILE_CACHE: "${{ runner.temp }}/hxcpp_cache" - uses: ./.github/actions/upload-itch with: butler-key: ${{ secrets.BUTLER_API_KEY}} build-dir: export/release/macos/bin target: macos # test-unit-win: # needs: create-nightly-win # runs-on: windows-latest # steps: # - name: get token from gh app # uses: actions/create-github-app-token@v1 # id: app_token # with: # app-id: ${{ vars.APP_ID }} # private-key: ${{ secrets.APP_PEM }} # owner: ${{ github.repository_owner }} # - name: checkout repo # uses: funkincrew/ci-checkout@v6 # with: # submodules: 'recursive' # token: ${{ steps.app_token.outputs.token }} # - name: Make HXCPP cache dir # run: | # mkdir -p ${{ runner.temp }}\hxcpp_cache # - name: Restore build cache # id: cache-build-win # uses: actions/cache@v4 # with: # path: | # .haxelib # export # ${{ runner.temp }}\hxcpp_cache # key: ${{ runner.os }}-test-win-${{ github.ref_name }}-${{ hashFiles('**/hmm.json') }} # - uses: ./.github/actions/setup-haxeshit # - name: Run unit tests # run: | # cd ./tests/unit/ # ./start-win-native.bat # env: # HXCPP_COMPILE_CACHE: "${{ runner.temp }}\\hxcpp_cache"