Merge pull request #81 from SeanMcG/fix-compiler-identification #148
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: build | |
on: | |
push: | |
branches: [ "master", "ci" ] | |
pull_request: | |
branches: [ "master", "ci" ] | |
jobs: | |
linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
cc: gcc | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: install dependencies (Linux) | |
run: | | |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe" | |
sudo apt-get update -y -qq | |
sudo apt-get install libasound2-dev libpulse-dev libwebp-dev libxrandr-dev tar | |
- name: configure | |
env: | |
CC: ${{ matrix.cc }} | |
run: | | |
./configure --with-internal-libs | |
- name: reconfigure extlibs (ogg) | |
run: | | |
cd extlib/src/libogg-1.3.5 | |
autoreconf -fi | |
autoupdate | |
- name: build | |
run: | | |
NCPUS=$(getconf _NPROCESSORS_ONLN) | |
make -j $NCPUS VERBOSE=true | |
make -j $NCPUS VERBOSE=true tools | |
make check | |
tar -czvf onscripter-en.Linux.x86-64.tar.gz \ | |
onscripter-en \ | |
README.md \ | |
COPYING \ | |
CHANGES \ | |
tools/ns2conv \ | |
tools/nsaconv \ | |
tools/sardec \ | |
tools/batchconv \ | |
tools/nbzdec \ | |
tools/ns2make \ | |
tools/nsamake \ | |
tools/sarconv \ | |
tools/ns2dec \ | |
tools/nsadec \ | |
tools/nscdec \ | |
tools/nscmake \ | |
tools/sarmake | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Linux x86-64 Build | |
path: ${{ github.workspace }}/onscripter-en.Linux.x86-64.tar.gz | |
windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
cc: gcc | |
sys: mingw64 | |
env: x86_64 | |
arch: x86-64 | |
- os: windows-latest | |
cc: gcc | |
sys: mingw32 | |
env: i686 | |
arch: i686 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: ${{matrix.sys}} | |
update: true | |
install: | |
mingw-w64-${{matrix.env}}-SDL | |
mingw-w64-${{matrix.env}}-SDL_ttf | |
mingw-w64-${{matrix.env}}-SDL_mixer | |
mingw-w64-${{matrix.env}}-SDL_image | |
mingw-w64-${{matrix.env}}-bzip2 | |
mingw-w64-${{matrix.env}}-libogg | |
mingw-w64-${{matrix.env}}-libvorbis | |
mingw-w64-${{matrix.env}}-freetype | |
mingw-w64-${{matrix.env}}-smpeg | |
mingw-w64-${{matrix.env}}-iconv | |
mingw-w64-${{matrix.env}}-zlib | |
mingw-w64-${{matrix.env}}-toolchain | |
mingw-w64-${{matrix.env}}-autotools | |
autotools | |
make | |
zip | |
- shell: msys2 {0} | |
name: Build | |
run: | | |
NCPUS=$(getconf _NPROCESSORS_ONLN) | |
make -f ./msys2/Makefile.Windows.MSYS2.${{matrix.arch}}.insani -j $NCPUS VERBOSE=true | |
make -f ./msys2/Makefile.Windows.MSYS2.${{matrix.arch}}.insani -j $NCPUS VERBOSE=true tools | |
make -f ./msys2/Makefile.Windows.MSYS2.${{matrix.arch}}.insani check | |
zip onscripter-en.Windows.${{matrix.arch}}.zip \ | |
onscripter-en.exe \ | |
README.md \ | |
COPYING \ | |
CHANGES \ | |
tools/ns2conv.exe \ | |
tools/nsaconv.exe \ | |
tools/sardec.exe \ | |
tools/batchconv.exe \ | |
tools/nbzdec.exe \ | |
tools/ns2make.exe \ | |
tools/nsamake.exe \ | |
tools/sarconv.exe \ | |
tools/ns2dec.exe \ | |
tools/nsadec.exe \ | |
tools/nscdec.exe \ | |
tools/nscmake.exe \ | |
tools/sarmake.exe | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Windows ${{matrix.arch}} Build | |
path: ${{ github.workspace }}/onscripter-en.Windows.${{matrix.arch}}.zip |