Add libretro port #249
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Emscripten CI | |
on: | |
push: | |
branches: '*' | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Dependencies | |
run: sudo apt-get install python3-pip && sudo pip3 install cloudsmith-cli | |
- uses: actions/checkout@v3 | |
- name: submodules | |
run: | | |
sed -i 's#\.\./#https://github.com/sdlpal/#g' .gitmodules | |
git submodule init && git submodule update | |
- name: Build | |
env: | |
TAG: 3.1.53 | |
run: | | |
sed -i 's@http://localhost:8080/@https://sdlpal.github.io/demo/@g' emscripten/Makefile | |
docker run -v ${{ github.workspace }}:/src emscripten/emsdk:$TAG /bin/bash -c "git config --global --add safe.directory /src && emmake make -C emscripten" | |
mkdir deploy | |
cd emscripten && zip ../deploy/sdlpal-emscripten.zip *.{html,js,wasm,wasm.map,png} | |
- name: Deploy to Demo | |
if: github.repository == 'sdlpal/sdlpal' && github.event_name != 'pull_request' | |
env: | |
AUTO_UPDATE_USER: ${{secrets.AUTO_UPDATE_USER}} | |
AUTO_UPDATE_PASS: ${{secrets.AUTO_UPDATE_PASS}} | |
AUTO_UPDATE_EMAIL: ${{secrets.AUTO_UPDATE_EMAIL}} | |
run: | | |
git config --global user.email ${AUTO_UPDATE_EMAIL} | |
git config --global user.name "AutoUpdate" | |
bash -c '[[ -f "emscripten/sdlpal.js" ]] && git clone --depth=1 https://github.com/sdlpal/demo ~/demo && cp -f emscripten/*.{html,js,wasm,wasm.map,png} ~/demo && cd ~/demo && git add -A && git commit -mAutoupdate -a && git push "https://${AUTO_UPDATE_USER}:${AUTO_UPDATE_PASS}@github.com/sdlpal/demo" || true' | |
- name: Deploy to CloudSmith | |
if: github.repository == 'sdlpal/sdlpal' && github.event_name != 'pull_request' | |
env: | |
CLOUDSMITH_API_KEY: ${{secrets.CLOUDSMITH_API_KEY}} | |
run: cloudsmith push raw sdlpal/sdlpal | |
--version `awk -F\" '{print $2;}' generated.h` --name Emscripten | |
--republish deploy/*.zip --tags "branch/`echo $GITHUB_REF | sed s#refs/heads/##`" | |