summaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
author Dirk Best <mail@dirk-best.de>2020-10-21 13:42:17 +0200
committer GitHub <noreply@github.com>2020-10-21 22:42:17 +1100
commit3eaf1be30c5ada8c04221432e13465931f2419b5 (patch)
treeb7d7510a0507b66d84624ee8424f18ff327f21a8 /.github
parent48f2dc146fdfad115fa88c602d410beb87e1eac3 (diff)
Create GitHub Actions for CI (#7335)
This is intended as a replacement for AppVeyor and parts of TravisCI. It will create full builds of MAME (including tools) for the following platforms: - Linux (GCC and Clang) - macOS (Clang) - Windows (GCC and MSVC 2019) It will also upload the resulting executable as artifact so that it can be used for regression testing. This commit also removes the unused TeaCI drone files.
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