Skip to content

solution: split god logic to classes instead common code #1135

solution: split god logic to classes instead common code

solution: split god logic to classes instead common code #1135

name: Akhenaten Build Emscripten
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build-akhenaten-emscripten-module:
name: run on linux
runs-on: ubuntu-22.04
container: emscripten/emsdk:4.0.1
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: build-project
run: |
git config --global --add safe.directory "*"
mkdir -p akhenaten-emscripten-module
mkdir -p build
mkdir -p build/data
cd build
emcmake cmake ../ -DCMAKE_BUILD_PLATFORM=win_emscripten -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS="-sMODULARIZE -sEXPORTED_RUNTIME_METHODS=callMain -sEXPORT_ALL -sEXPORT_NAME=akhenatem" -DCMAKE_CXX_FLAGS="" && emmake make
cd ..
cp build/akhenaten.js akhenaten-emscripten-module/
cp build/akhenaten.wasm akhenaten-emscripten-module/
cp ./data/pharaoh_fonts_pack.sgx ./build/data/pharaoh_fonts_pack.sgx
cp ./data/pharaoh_custom_pack.sgx ./build/data/pharaoh_custom_pack.sgx
cp ./data/pharaoh_houses_pack.sgx ./build/data/pharaoh_houses_pack.sgx
cp ./data/neucha.ttf ./build/data/neucha.ttf
- uses: actions/upload-artifact@v4
with:
name: emscripten_build
path: akhenaten-emscripten-module
build-Akhenaten-ems-launcher:
runs-on: ubuntu-latest
needs: build-akhenaten-emscripten-module
steps:
- name: Checkout launcher 🛎️
uses: actions/checkout@v4
with:
repository: dalerank/akhenaten-ems
ref: refs/heads/main
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: emscripten_build
path: src/assets/module/
env:
VITE_BASE: /
- name: Install and Build 🔧
run: |
npm install
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.PAGES_DEPLOY }}
repository-name: dalerank/dalerank.github.io
branch: main
folder: dist
target-folder: /
clean: true
single-commit: true