auto-test code compilability in different platforms

This commit is contained in:
Wengier 2021-11-25 19:54:23 -05:00
parent ae13e52cf6
commit 9bc9ba61a0
4 changed files with 122 additions and 0 deletions

31
.github/workflows/linux.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Linux builds
on: [push, pull_request]
#on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: DOSBox-X Linux
run: |
sudo apt-get update -y
sudo apt-get install -y fluidsynth libfluidsynth-dev libpcap-dev libslirp-dev
top=`pwd`
mkdir $top/src/bin
./build-debug
strip --strip-all $top/src/dosbox-x
$top/src/dosbox-x -tests
cp $top/src/dosbox-x $top/src/bin/dosbox-x-sdl1
./build-debug-sdl2
strip --strip-all $top/src/dosbox-x
$top/src/dosbox-x -tests
cp $top/src/dosbox-x $top/src/bin/dosbox-x-sdl2
- name: Upload release package
uses: actions/upload-artifact@v2
with:
name: dosbox-x-linux
path: ${{ github.workspace }}/src/bin/

25
.github/workflows/macos.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: macOS builds
on: [push, pull_request]
#on: workflow_dispatch
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: DOSBox-X macOS
run: |
brew install autoconf automake
top=`pwd`
mkdir $top/src/bin
./build-macosx
strip $top/src/dosbox-x
cp $top/src/dosbox-x $top/src/bin/dosbox-x-sdl1
./build-macosx-sdl2
strip $top/src/dosbox-x
cp $top/src/dosbox-x $top/src/bin/dosbox-x-sdl2
- name: Upload release package
uses: actions/upload-artifact@v2
with:
name: dosbox-x-macos
path: ${{ github.workspace }}/src/bin/

33
.github/workflows/mingw32.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: 32-bit MinGW builds
on: [push, pull_request]
#on: workflow_dispatch
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: true
install: git mingw-w64-i686-toolchain mingw-w64-i686-libslirp mingw-w64-i686-libtool autoconf automake
- name: DOSBox-X MinGW32
run: |
top=`pwd`
ln -s $top/build-scripts/mingw/make.exe /usr/bin/make.exe
mkdir $top/src/bin
./build-mingw
strip --strip-all $top/src/dosbox-x.exe
cp $top/src/dosbox-x.exe $top/src/bin/dosbox-x-sdl1.exe
./build-mingw-sdl2
strip --strip-all $top/src/dosbox-x.exe
cp $top/src/dosbox-x.exe $top/src/bin/dosbox-x-sdl2.exe
- name: Upload release package
uses: actions/upload-artifact@v2
with:
name: dosbox-x-mingw32
path: ${{ github.workspace }}/src/bin/

33
.github/workflows/mingw64.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: 64-bit MinGW builds
on: [push, pull_request]
#on: workflow_dispatch
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain mingw-w64-x86_64-libslirp mingw-w64-x86_64-libtool autoconf automake
- name: DOSBox-X MinGW64
run: |
top=`pwd`
ln -s $top/build-scripts/mingw/make.exe /usr/bin/make.exe
mkdir $top/src/bin
./build-mingw
strip --strip-all $top/src/dosbox-x.exe
cp $top/src/dosbox-x.exe $top/src/bin/dosbox-x-sdl1.exe
./build-mingw-sdl2
strip --strip-all $top/src/dosbox-x.exe
cp $top/src/dosbox-x.exe $top/src/bin/dosbox-x-sdl2.exe
- name: Upload release package
uses: actions/upload-artifact@v2
with:
name: dosbox-x-mingw64
path: ${{ github.workspace }}/src/bin/