summaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci-linux.yml40
-rw-r--r--.github/workflows/ci-macos.yml24
-rw-r--r--.github/workflows/ci-windows.yml58
3 files changed, 122 insertions, 0 deletions
diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml
new file mode 100644
index 00000000000..953eefbe971
--- /dev/null
+++ b/.github/workflows/ci-linux.yml
@@ -0,0 +1,40 @@
+name: CI (Linux)
+
+on: [push, pull_request]
+
+jobs:
+ build-linux:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ compiler: [gcc, clang]
+ include:
+ - compiler: gcc
+ cc: gcc
+ cxx: g++
+ archopts: -U_FORTIFY_SOURCE
+ - compiler: clang
+ cc: clang
+ cxx: clang++
+ steps:
+ - uses: actions/checkout@master
+ - name: Install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev libasound2-dev libxinerama-dev libxi-dev qt5-default
+ - name: Install clang
+ if: matrix.compiler == 'clang'
+ run: sudo apt-get install -y clang
+ - name: Build
+ env:
+ OVERRIDE_CC: ${{ matrix.cc }}
+ OVERRIDE_CXX: ${{ matrix.cxx }}
+ ARCHOPTS: ${{ matrix.archopts }}
+ TOOLS: 1
+ run: make -j2
+ - name: Validate
+ run: ./mame64 -validate
+ - uses: actions/upload-artifact@master
+ with:
+ name: mame64-linux-${{ matrix.compiler }}-${{ github.sha }}
+ path: mame64
diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml
new file mode 100644
index 00000000000..0337945a251
--- /dev/null
+++ b/.github/workflows/ci-macos.yml
@@ -0,0 +1,24 @@
+name: CI (macOS)
+
+on: [push, pull_request]
+
+jobs:
+ build-macos:
+ runs-on: macOS-latest
+ steps:
+ - uses: actions/checkout@master
+ - name: Install dependencies
+ run: |
+ brew update
+ brew install sdl2
+ - name: Build
+ env:
+ USE_LIBSDL: 1
+ TOOLS: 1
+ run: make -j2
+ - name: Validate
+ run: ./mame64 -validate
+ - uses: actions/upload-artifact@master
+ with:
+ name: mame64-macos-${{ github.sha }}
+ path: mame64
diff --git a/.github/workflows/ci-windows.yml b/.github/workflows/ci-windows.yml
new file mode 100644
index 00000000000..bdd2fe85166
--- /dev/null
+++ b/.github/workflows/ci-windows.yml
@@ -0,0 +1,58 @@
+name: CI (Windows)
+
+on: [push, pull_request]
+
+jobs:
+
+ build-windows-gcc:
+ runs-on: windows-latest
+ defaults:
+ run:
+ shell: msys2 {0}
+ steps:
+ - uses: msys2/setup-msys2@v2
+ with:
+ update: true
+ install: git make mingw-w64-x86_64-gcc mingw-w64-x86_64-python mingw-w64-x86_64-lld
+ - uses: actions/checkout@master
+ - name: Build
+ env:
+ MINGW64: "/mingw64"
+ ARCHOPTS: "-fuse-ld=lld"
+ TOOLS: 1
+ run: make -j2
+ - name: Validate
+ run: ./mame64 -validate
+ - uses: actions/upload-artifact@master
+ with:
+ name: mame64-windows-gcc-${{ github.sha }}
+ path: mame64.exe
+
+ build-windows-msvc:
+ runs-on: windows-latest
+ steps:
+ - uses: msys2/setup-msys2@v2
+ with:
+ update: true
+ install: git make mingw-w64-x86_64-gcc mingw-w64-x86_64-python
+ - uses: actions/checkout@master
+ - name: Add msbuild to PATH
+ uses: microsoft/setup-msbuild@v1.0.1
+ - name: Generate build files
+ shell: msys2 {0}
+ env:
+ MINGW64: "/mingw64"
+ TOOLS: 1
+ run: make -j2 vs2019
+ - name: Build
+ shell: cmd
+ env:
+ PreferredToolArchitecture: x64
+ run: msbuild "build\projects\windows\mame\vs2019\mame.sln" /m:2 /p:ContinueOnError=false /p:StopOnFirstFailure=true /property:Configuration=Release /property:Platform=x64
+ - name: Validate
+ shell: cmd
+ run: mame64 -validate
+ - uses: actions/upload-artifact@master
+ with:
+ name: mame64-windows-msvc-${{ github.sha }}
+ path: mame64.exe