Skip to content

Commit

Permalink
GHA emscripten (#59)
Browse files Browse the repository at this point in the history
* Makefile.emscripten

* gha build emscripten

* ci sudo

* ci sudo

* ci make -f Makefile.emscripten

* ci bash as default shell

* ci chsh -s /bin/bash $USER

* ci bash as default shell

* ci shell: bash

* ci shell: bash

* ci shell: bash

* ci shell: bash

* ci shell: bash

* ci shell: bash

* ci shell: bash

* ci shell: bash

* ci shell: bash

* ci shell: bash

* ci EMSDK_VERSION=3.1.51

* ci HAVE_GFX_WIDGETS=0

* ci sed

* ci emscripten.yml

* ci emscripten.yml

* Update emscripten.yml

* Update emscripten.yml

* Update emscripten.yml

* Update emscripten.yml

* Update emscripten.yml

* Update emscripten.yml

* Update emscripten.yml

* Update emscripten.yml

* Update emscripten.yml

* Update emscripten.yml

* Update emscripten.yml
  • Loading branch information
humbertodias authored Jun 28, 2024
1 parent 8117e78 commit 5474ed1
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/emscripten.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI emscripten

on:
push

jobs:
build:
name: Compile
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Install emsdk
shell: bash
run: |
EMSDK_VERSION=3.1.51
cd /tmp && git clone https://github.com/emscripten-core/emsdk && cd emsdk && ./emsdk install ${EMSDK_VERSION} && ./emsdk activate ${EMSDK_VERSION} && \
bash -c "source emsdk_env.sh" && \
echo 'source "/tmp/emsdk/emsdk_env.sh"' >> ~/.bash_profile
- name: Get Information Variables
id: core
run: |
echo "platform=$(echo emscripten)" >> $GITHUB_OUTPUT
echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
- name: Compile project
shell: bash
run: |
source ~/.bash_profile && \
emmake make -f Makefile.libretro platform=emscripten && \
git clone https://github.com/libretro/RetroArch.git && \
cp 2048_libretro_emscripten.bc RetroArch/libretro_emscripten.bc && \
cd RetroArch && \
sed -i "s/-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1/-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 -sGL_ENABLE_GET_PROC_ADDRESS/g" Makefile.emscripten && \
emmake make -f Makefile.emscripten LIBRETRO=2028 -j all && \
ls -lha 2028_libretro.* && \
mkdir -p ${{ github.workspace }}/artifact
cp 2028_libretro.* ${{ github.workspace }}/artifact
- name: Upload artifacts
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: 20408_libretro_${{ steps.core.outputs.platform }}-${{ steps.core.outputs.sha8 }}
path: ${{ github.workspace }}/artifact/**/*
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
*.so
.deps
.libs

2048_libretro_emscripten.bc
2048_libretro.dylib
RetroArch
.vscode

0 comments on commit 5474ed1

Please sign in to comment.