1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-12-27 15:37:49 +00:00
Funkin/.github/workflows/build-game.yml

130 lines
3.5 KiB
YAML
Raw Normal View History

feat: ci parallelization, linux builds, ci refactoring (#484) * first linux build attempt * linux deps! * hxcodec dependencies * build timeouts * reup hxcpp cache every time by default gh actions will not update caches on cache hit. since the hxcpp cache grows with compiles, that's not what we want here. since we *do* need the files newly compiled. * ci speed test * group runners by purpose * REFACTOR CI. IT WAS NEEDED * smol changies * second attempt at libc * fix any format issues * it's 1:50am * migrate away from gacts/run-and-post-run@v1 * apt does not have a stable cli interface. use with caution in scripts * first attempt at libffi6 * second attempt at libffi6 * fuck that * sigh * html5 also needs new libc * make sure rerunning ln -s doesn't fail the build * desperate attempt * arc attempt * arc, ii * ci * apt-GET * who needs safeguards anyway * clean ci build * debug time * lots of connectivity debugging * :pleading_face: * natesales/q * i'm not very smart * debug hard? * whose traceroute? * pls * ... * we go even newer * merge moment * haxelib maybe * debug info * :pleading_face: * lower mtu runner? * libffi my beloved * no multiline env? * smol buggy * non docker-aware vars * i love bash * builds hopefully go nyoom * forgor native dep * [skip ci] meow * convenient typo * sigh * [skip ci] waow * [skip ci] docker is hard * i don't understand docker tbh * debuggering * docking * small amount of dumb but still doesn't explain why curl doesn't curl * just vsc things * ca certs issue? * please this has to be the one * find -type d fail, laugh at this user * too eepy * im not that smart am i * attempt to run containerized from docker base image * [skip-ci] some more docking * might as well try * :pleaading_face: * ? * ! * idea * sigh * i give in * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * :pleading_face: * hopefully fix hxcpp cache * [skip ci] a little dx never hurt anyone * try removing things until it breaks * welp that was easy * not-docker-friendly paths in non-docker env, etc. you get the point * more sane default cache size * finishing touches * welp * mounted volume * no systemd, got it * more failproof dockerfile * does this not have ossh * haxelib master * hopefully final docker build * bob the builder * docking :3 * image cleanup * github moment * okay mayb * gotta set it up first * i have an idea * hope we ready * :pleading_face: * fuck * sigh * trigger build on new image * no comment * global hxcpp, first idea * yikes * hxcpp oopsy * code dupe * more code dupe * lint * increase hxcpp cache size on native builds as well * buttons :3 * oops * forgor to export env variable * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2024-04-14 21:49:41 +00:00
name: Build and Upload nightly game builds
on:
workflow_dispatch:
push:
paths-ignore:
- '**/Dockerfile'
- '.github/workflows/build-docker-image.yml'
jobs:
build-game-on-host:
strategy:
matrix:
include:
- target: windows
- target: macos
runs-on:
- ${{ matrix.target }}
defaults:
run:
shell: bash
steps:
- name: Make git happy
run: |
2024-04-24 21:08:35 +00:00
git config --global --replace-all safe.directory $GITHUB_WORKSPACE
feat: ci parallelization, linux builds, ci refactoring (#484) * first linux build attempt * linux deps! * hxcodec dependencies * build timeouts * reup hxcpp cache every time by default gh actions will not update caches on cache hit. since the hxcpp cache grows with compiles, that's not what we want here. since we *do* need the files newly compiled. * ci speed test * group runners by purpose * REFACTOR CI. IT WAS NEEDED * smol changies * second attempt at libc * fix any format issues * it's 1:50am * migrate away from gacts/run-and-post-run@v1 * apt does not have a stable cli interface. use with caution in scripts * first attempt at libffi6 * second attempt at libffi6 * fuck that * sigh * html5 also needs new libc * make sure rerunning ln -s doesn't fail the build * desperate attempt * arc attempt * arc, ii * ci * apt-GET * who needs safeguards anyway * clean ci build * debug time * lots of connectivity debugging * :pleading_face: * natesales/q * i'm not very smart * debug hard? * whose traceroute? * pls * ... * we go even newer * merge moment * haxelib maybe * debug info * :pleading_face: * lower mtu runner? * libffi my beloved * no multiline env? * smol buggy * non docker-aware vars * i love bash * builds hopefully go nyoom * forgor native dep * [skip ci] meow * convenient typo * sigh * [skip ci] waow * [skip ci] docker is hard * i don't understand docker tbh * debuggering * docking * small amount of dumb but still doesn't explain why curl doesn't curl * just vsc things * ca certs issue? * please this has to be the one * find -type d fail, laugh at this user * too eepy * im not that smart am i * attempt to run containerized from docker base image * [skip-ci] some more docking * might as well try * :pleaading_face: * ? * ! * idea * sigh * i give in * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * :pleading_face: * hopefully fix hxcpp cache * [skip ci] a little dx never hurt anyone * try removing things until it breaks * welp that was easy * not-docker-friendly paths in non-docker env, etc. you get the point * more sane default cache size * finishing touches * welp * mounted volume * no systemd, got it * more failproof dockerfile * does this not have ossh * haxelib master * hopefully final docker build * bob the builder * docking :3 * image cleanup * github moment * okay mayb * gotta set it up first * i have an idea * hope we ready * :pleading_face: * fuck * sigh * trigger build on new image * no comment * global hxcpp, first idea * yikes * hxcpp oopsy * code dupe * more code dupe * lint * increase hxcpp cache size on native builds as well * buttons :3 * oops * forgor to export env variable * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2024-04-14 21:49:41 +00:00
- name: Get checkout token
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 }}
persist-credentials: false
feat: ci parallelization, linux builds, ci refactoring (#484) * first linux build attempt * linux deps! * hxcodec dependencies * build timeouts * reup hxcpp cache every time by default gh actions will not update caches on cache hit. since the hxcpp cache grows with compiles, that's not what we want here. since we *do* need the files newly compiled. * ci speed test * group runners by purpose * REFACTOR CI. IT WAS NEEDED * smol changies * second attempt at libc * fix any format issues * it's 1:50am * migrate away from gacts/run-and-post-run@v1 * apt does not have a stable cli interface. use with caution in scripts * first attempt at libffi6 * second attempt at libffi6 * fuck that * sigh * html5 also needs new libc * make sure rerunning ln -s doesn't fail the build * desperate attempt * arc attempt * arc, ii * ci * apt-GET * who needs safeguards anyway * clean ci build * debug time * lots of connectivity debugging * :pleading_face: * natesales/q * i'm not very smart * debug hard? * whose traceroute? * pls * ... * we go even newer * merge moment * haxelib maybe * debug info * :pleading_face: * lower mtu runner? * libffi my beloved * no multiline env? * smol buggy * non docker-aware vars * i love bash * builds hopefully go nyoom * forgor native dep * [skip ci] meow * convenient typo * sigh * [skip ci] waow * [skip ci] docker is hard * i don't understand docker tbh * debuggering * docking * small amount of dumb but still doesn't explain why curl doesn't curl * just vsc things * ca certs issue? * please this has to be the one * find -type d fail, laugh at this user * too eepy * im not that smart am i * attempt to run containerized from docker base image * [skip-ci] some more docking * might as well try * :pleaading_face: * ? * ! * idea * sigh * i give in * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * :pleading_face: * hopefully fix hxcpp cache * [skip ci] a little dx never hurt anyone * try removing things until it breaks * welp that was easy * not-docker-friendly paths in non-docker env, etc. you get the point * more sane default cache size * finishing touches * welp * mounted volume * no systemd, got it * more failproof dockerfile * does this not have ossh * haxelib master * hopefully final docker build * bob the builder * docking :3 * image cleanup * github moment * okay mayb * gotta set it up first * i have an idea * hope we ready * :pleading_face: * fuck * sigh * trigger build on new image * no comment * global hxcpp, first idea * yikes * hxcpp oopsy * code dupe * more code dupe * lint * increase hxcpp cache size on native builds as well * buttons :3 * oops * forgor to export env variable * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2024-04-14 21:49:41 +00:00
- name: Setup build environment
uses: ./.github/actions/setup-haxe
2024-04-24 21:08:35 +00:00
with:
gh-token: ${{ steps.app_token.outputs.token }}
feat: ci parallelization, linux builds, ci refactoring (#484) * first linux build attempt * linux deps! * hxcodec dependencies * build timeouts * reup hxcpp cache every time by default gh actions will not update caches on cache hit. since the hxcpp cache grows with compiles, that's not what we want here. since we *do* need the files newly compiled. * ci speed test * group runners by purpose * REFACTOR CI. IT WAS NEEDED * smol changies * second attempt at libc * fix any format issues * it's 1:50am * migrate away from gacts/run-and-post-run@v1 * apt does not have a stable cli interface. use with caution in scripts * first attempt at libffi6 * second attempt at libffi6 * fuck that * sigh * html5 also needs new libc * make sure rerunning ln -s doesn't fail the build * desperate attempt * arc attempt * arc, ii * ci * apt-GET * who needs safeguards anyway * clean ci build * debug time * lots of connectivity debugging * :pleading_face: * natesales/q * i'm not very smart * debug hard? * whose traceroute? * pls * ... * we go even newer * merge moment * haxelib maybe * debug info * :pleading_face: * lower mtu runner? * libffi my beloved * no multiline env? * smol buggy * non docker-aware vars * i love bash * builds hopefully go nyoom * forgor native dep * [skip ci] meow * convenient typo * sigh * [skip ci] waow * [skip ci] docker is hard * i don't understand docker tbh * debuggering * docking * small amount of dumb but still doesn't explain why curl doesn't curl * just vsc things * ca certs issue? * please this has to be the one * find -type d fail, laugh at this user * too eepy * im not that smart am i * attempt to run containerized from docker base image * [skip-ci] some more docking * might as well try * :pleaading_face: * ? * ! * idea * sigh * i give in * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * :pleading_face: * hopefully fix hxcpp cache * [skip ci] a little dx never hurt anyone * try removing things until it breaks * welp that was easy * not-docker-friendly paths in non-docker env, etc. you get the point * more sane default cache size * finishing touches * welp * mounted volume * no systemd, got it * more failproof dockerfile * does this not have ossh * haxelib master * hopefully final docker build * bob the builder * docking :3 * image cleanup * github moment * okay mayb * gotta set it up first * i have an idea * hope we ready * :pleading_face: * fuck * sigh * trigger build on new image * no comment * global hxcpp, first idea * yikes * hxcpp oopsy * code dupe * more code dupe * lint * increase hxcpp cache size on native builds as well * buttons :3 * oops * forgor to export env variable * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2024-04-14 21:49:41 +00:00
- name: Build game
if: ${{ matrix.target == 'windows' }}
run: |
haxelib run lime build windows -v -release -DGITHUB_BUILD
timeout-minutes: 120
- name: Build game
if: ${{ matrix.target != 'windows' }}
run: |
haxelib run lime build ${{ matrix.target }} -v -release --times -DGITHUB_BUILD
timeout-minutes: 120
- name: Upload build artifacts
uses: ./.github/actions/upload-itch
with:
butler-key: ${{ secrets.BUTLER_API_KEY}}
target: ${{ matrix.target }}
build-game-in-container:
runs-on: build-set
container: ghcr.io/funkincrew/build-dependencies:latest
strategy:
matrix:
include:
- target: linux
- target: html5
defaults:
run:
shell: bash
steps:
- name: Get checkout token
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 }}
2024-04-24 21:08:35 +00:00
persist-credentials: false
feat: ci parallelization, linux builds, ci refactoring (#484) * first linux build attempt * linux deps! * hxcodec dependencies * build timeouts * reup hxcpp cache every time by default gh actions will not update caches on cache hit. since the hxcpp cache grows with compiles, that's not what we want here. since we *do* need the files newly compiled. * ci speed test * group runners by purpose * REFACTOR CI. IT WAS NEEDED * smol changies * second attempt at libc * fix any format issues * it's 1:50am * migrate away from gacts/run-and-post-run@v1 * apt does not have a stable cli interface. use with caution in scripts * first attempt at libffi6 * second attempt at libffi6 * fuck that * sigh * html5 also needs new libc * make sure rerunning ln -s doesn't fail the build * desperate attempt * arc attempt * arc, ii * ci * apt-GET * who needs safeguards anyway * clean ci build * debug time * lots of connectivity debugging * :pleading_face: * natesales/q * i'm not very smart * debug hard? * whose traceroute? * pls * ... * we go even newer * merge moment * haxelib maybe * debug info * :pleading_face: * lower mtu runner? * libffi my beloved * no multiline env? * smol buggy * non docker-aware vars * i love bash * builds hopefully go nyoom * forgor native dep * [skip ci] meow * convenient typo * sigh * [skip ci] waow * [skip ci] docker is hard * i don't understand docker tbh * debuggering * docking * small amount of dumb but still doesn't explain why curl doesn't curl * just vsc things * ca certs issue? * please this has to be the one * find -type d fail, laugh at this user * too eepy * im not that smart am i * attempt to run containerized from docker base image * [skip-ci] some more docking * might as well try * :pleaading_face: * ? * ! * idea * sigh * i give in * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * :pleading_face: * hopefully fix hxcpp cache * [skip ci] a little dx never hurt anyone * try removing things until it breaks * welp that was easy * not-docker-friendly paths in non-docker env, etc. you get the point * more sane default cache size * finishing touches * welp * mounted volume * no systemd, got it * more failproof dockerfile * does this not have ossh * haxelib master * hopefully final docker build * bob the builder * docking :3 * image cleanup * github moment * okay mayb * gotta set it up first * i have an idea * hope we ready * :pleading_face: * fuck * sigh * trigger build on new image * no comment * global hxcpp, first idea * yikes * hxcpp oopsy * code dupe * more code dupe * lint * increase hxcpp cache size on native builds as well * buttons :3 * oops * forgor to export env variable * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2024-04-14 21:49:41 +00:00
- name: Config haxelib
run: |
haxelib --never newrepo
echo "HAXEPATH=$(haxelib config)" >> "$GITHUB_ENV"
- name: Restore cached dependencies
id: cache-hmm
uses: actions/cache@v4
with:
path: .haxelib
key: haxe-hmm-${{ runner.os }}-${{ hashFiles('**/hmm.json') }}
- if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }}
name: Install dependencies
run: |
2024-04-24 21:21:54 +00:00
git config --global 'url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf' https://github.com/
2024-04-24 21:08:35 +00:00
haxelib --global run hmm install -q
feat: ci parallelization, linux builds, ci refactoring (#484) * first linux build attempt * linux deps! * hxcodec dependencies * build timeouts * reup hxcpp cache every time by default gh actions will not update caches on cache hit. since the hxcpp cache grows with compiles, that's not what we want here. since we *do* need the files newly compiled. * ci speed test * group runners by purpose * REFACTOR CI. IT WAS NEEDED * smol changies * second attempt at libc * fix any format issues * it's 1:50am * migrate away from gacts/run-and-post-run@v1 * apt does not have a stable cli interface. use with caution in scripts * first attempt at libffi6 * second attempt at libffi6 * fuck that * sigh * html5 also needs new libc * make sure rerunning ln -s doesn't fail the build * desperate attempt * arc attempt * arc, ii * ci * apt-GET * who needs safeguards anyway * clean ci build * debug time * lots of connectivity debugging * :pleading_face: * natesales/q * i'm not very smart * debug hard? * whose traceroute? * pls * ... * we go even newer * merge moment * haxelib maybe * debug info * :pleading_face: * lower mtu runner? * libffi my beloved * no multiline env? * smol buggy * non docker-aware vars * i love bash * builds hopefully go nyoom * forgor native dep * [skip ci] meow * convenient typo * sigh * [skip ci] waow * [skip ci] docker is hard * i don't understand docker tbh * debuggering * docking * small amount of dumb but still doesn't explain why curl doesn't curl * just vsc things * ca certs issue? * please this has to be the one * find -type d fail, laugh at this user * too eepy * im not that smart am i * attempt to run containerized from docker base image * [skip-ci] some more docking * might as well try * :pleaading_face: * ? * ! * idea * sigh * i give in * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * :pleading_face: * hopefully fix hxcpp cache * [skip ci] a little dx never hurt anyone * try removing things until it breaks * welp that was easy * not-docker-friendly paths in non-docker env, etc. you get the point * more sane default cache size * finishing touches * welp * mounted volume * no systemd, got it * more failproof dockerfile * does this not have ossh * haxelib master * hopefully final docker build * bob the builder * docking :3 * image cleanup * github moment * okay mayb * gotta set it up first * i have an idea * hope we ready * :pleading_face: * fuck * sigh * trigger build on new image * no comment * global hxcpp, first idea * yikes * hxcpp oopsy * code dupe * more code dupe * lint * increase hxcpp cache size on native builds as well * buttons :3 * oops * forgor to export env variable * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
2024-04-14 21:49:41 +00:00
- if: ${{ matrix.target != 'html5' }}
name: Restore hxcpp cache
uses: actions/cache@v4
with:
path: /usr/share/hxcpp
key: haxe-hxcpp-${{ runner.os }}-${{ github.ref_name }}-${{ github.sha }}
restore-keys: haxe-hxcpp-${{ runner.os }}-${{ github.ref_name }}
- name: Build game
run: |
haxelib run lime build ${{ matrix.target }} -v -release --times -DGITHUB_BUILD
timeout-minutes: 120
- name: Upload build artifacts
uses: ./.github/actions/upload-itch
with:
butler-key: ${{ secrets.BUTLER_API_KEY}}
target: ${{ matrix.target }}