Merge pull request #263 from domeengine/collectionAddAll #605
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: Multi-platform Build Release | |
on: | |
pull_request: | |
types: [assigned, opened, synchronize, reopened] | |
release: | |
types: [published] | |
push: | |
branches: [ develop ] | |
jobs: | |
build-web: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: mymindstorm/setup-emsdk@v7 | |
- name: Verify | |
run: emcc -v | |
- name: Checkout | |
uses: actions/[email protected] | |
- run: git fetch --prune --unshallow | |
- run: make MODE=release dome.html ARCH=web | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dome-web | |
path: | | |
dome.html | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
static: [1, 0] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- run: git fetch --prune --unshallow | |
- run: sudo apt-get update | |
- run: sudo apt-get install build-essential mercurial make cmake autoconf automake libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev libgl1-mesa-dev libdbus-1-dev libudev-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev libxkbcommon-dev | |
- name: Cache dependancies | |
if: ${{matrix.static == 1}} | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./lib/SDL* | |
./lib/sdl* | |
./lib/libSDL2* | |
key: ${{ runner.os }}-${{ hashFiles('./scripts/vars.sh') }}-sdl | |
- run: sudo apt-get install libsdl2-dev | |
if: ${{matrix.static == 0}} | |
- run: ./scripts/setup_static_linux_sdl.sh | |
if: ${{matrix.static == 1}} | |
- run: make MODE=release STATIC=${{matrix.static}} | |
- uses: actions/upload-artifact@v3 | |
if: ${{matrix.static == 1}} | |
with: | |
name: dome-linux-x64 | |
path: | | |
dome | |
main.wren | |
- uses: actions/upload-artifact@v3 | |
if: ${{matrix.static == 0}} | |
with: | |
name: dome-linux-x64-shared | |
path: | | |
dome | |
main.wren | |
build-mac: | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: '14.2' | |
# - run: sudo xcode-select -switch /Applications/Xcode_14.2.app/Contents/Developer | |
- name: Cache dependancies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./lib/SDL* | |
./lib/sdl* | |
./lib/libSDL2* | |
key: ${{ runner.os }}-${{ hashFiles('./scripts/vars.sh') }}-sdl | |
- run: ./scripts/setup_static_mac_sdl.sh | |
- run: make MIN_MAC_VERSION=10.12 STATIC=1 | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dome-macosx-all | |
path: | | |
dome | |
main.wren | |
build-windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
msystem: [MINGW32, MINGW64] | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{ matrix.msystem }} | |
release: true | |
update: true | |
install: git make mercurial subversion | |
- run: pacman --noconfirm -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-SDL2 | |
if: ${{ (matrix.msystem == 'MINGW64') }} | |
- run: pacman --noconfirm -S mingw-w64-i686-toolchain mingw-w64-i686-SDL2 | |
if: ${{ (matrix.msystem == 'MINGW32') }} | |
- run: git fetch --prune --unshallow | |
- run: gcc -v | |
- run: "make STATIC=1 TARGET_NAME=dome CC=gcc" | |
- uses: actions/upload-artifact@v3 | |
if: ${{ (matrix.msystem == 'MINGW32') }} | |
with: | |
name: dome-windows-x32 | |
path: | | |
dome.exe | |
main.wren | |
- uses: actions/upload-artifact@v3 | |
if: ${{ (matrix.msystem == 'MINGW64') }} | |
with: | |
name: dome-windows-x64 | |
path: | | |
dome.exe | |
main.wren | |
release-artifacts: | |
if: ${{ github.event.action == 'published' }} | |
needs: [ build-linux, build-mac, build-windows, build-web ] | |
runs-on: ubuntu-latest | |
name: Upload Release Artifacts | |
steps: | |
- uses: actions/download-artifact@v2 | |
- uses: montudor/[email protected] | |
with: | |
args: zip -qq -r dome-linux-x64.zip dome-linux-x64 | |
- uses: montudor/[email protected] | |
with: | |
args: zip -qq -r dome-linux-x64-shared.zip dome-linux-x64-shared | |
- uses: montudor/[email protected] | |
with: | |
args: zip -qq -r dome-windows-x64.zip dome-windows-x64 | |
- uses: montudor/[email protected] | |
with: | |
args: zip -qq -r dome-windows-x32.zip dome-windows-x32 | |
- uses: montudor/[email protected] | |
with: | |
args: zip -qq -r dome-macosx-all.zip dome-macosx-all | |
- uses: montudor/[email protected] | |
with: | |
args: zip -qq -r dome-web.zip dome-web | |
- run: ls -la | |
- name: Upload Linux Shared | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dome-linux-x64-shared.zip | |
asset_name: dome-${{github.event.release.tag_name}}-linux-x64-shared.zip | |
asset_content_type: application/zip | |
- name: Upload Linux Static | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dome-linux-x64.zip | |
asset_name: dome-${{github.event.release.tag_name}}-linux-x64.zip | |
asset_content_type: application/zip | |
- name: Upload Windows x64 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dome-windows-x64.zip | |
asset_name: dome-${{github.event.release.tag_name}}-windows-x64.zip | |
asset_content_type: application/zip | |
- name: Upload Windows x32 | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dome-windows-x32.zip | |
asset_name: dome-${{github.event.release.tag_name}}-windows-x32.zip | |
asset_content_type: application/zip | |
- name: Upload Mac OS X | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dome-macosx-all.zip | |
asset_name: dome-${{github.event.release.tag_name}}-macosx-all.zip | |
asset_content_type: application/zip | |
- name: Upload Web Engine | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./dome-web.zip | |
asset_name: dome-${{github.event.release.tag_name}}-web.zip | |
asset_content_type: application/zip |