1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-05 06:14:36 +00:00
Funkin/.github/workflows/build-shit.yml
Hazel d6bc8d88aa fix(ci): checkout, html5 (#305)
* fetch-depth=1

* switch to app tokens

* docs?

* docs!

* actions / doesnt check out

* mac attempt 1

* custom setup haxe action

* trigger ci run thanks github

* interesting

* meow

* use tags

* homebrew fixing maybe

* mymindishazel/actions-setup-haxe@vC.1.8

* automationgit pushgit pushgit push

* rosetta all the way?

* macos oopsy

* mac cache && move ci to org

* update checkout action to do post-checkout cleaning

* update haxe & cache actions to node 20

* retry action but with updated ci-checkout@v6

* cleanup: there's no scheduled runs

* actions/cache@v4 in setup-haxe

* update to haxe 4.3

* lack of libc?

* ubuntu 23.10 has glibc 2.38

---------

Co-authored-by: Eric <ericmyllyoja@gmail.com>
Co-authored-by: Cameron Taylor <cameron.taylor.ninja@gmail.com>
2024-01-29 14:50:04 -05:00

158 lines
5.1 KiB
YAML

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
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: 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 }}
- 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
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
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"