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.
This commit is contained in:
Dirk Best 2020-10-21 13:42:17 +02:00 committed by GitHub
parent 48f2dc146f
commit 3eaf1be30c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 129 additions and 132 deletions

View File

@ -1,58 +0,0 @@
version: 1.0.{build}
image:
- Visual Studio 2017
- Visual Studio 2019
shallow_clone: true
clone_depth: 1
environment:
matrix:
- BUILD: GCC
- BUILD: MSVC
matrix:
exclude:
- image: Visual Studio 2017
BUILD: MSVC
- image: Visual Studio 2019
BUILD: GCC
install:
- set "PATH=C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH%"
- set MSYSTEM=MINGW64
build_script:
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && export MINGW64=/mingw64 && make SUBTARGET=ci PTR64=1 TOOLS=1 OPTIMIZE=0 vs2019 -j3"
- msbuild "build\projects\windows\mameci\vs2019\mameci.sln" /m /p:ContinueOnError=false /p:StopOnFirstFailure=true /property:Configuration=Debug /property:Platform=x64 /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
for:
-
matrix:
only:
- BUILD: GCC
cache:
- C:\msys64\var\cache\pacman\pkg
install:
- set "PATH=C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH%"
- set MSYSTEM=MINGW64
- bash -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
- bash -lc "curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
- bash -lc "pacman-key --verify msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig"
- bash -lc "pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz"
- bash -lc "pacman -Syu --noconfirm"
- taskkill /f /fi "MODULES eq msys-2.0.dll"
- bash -lc "pacman -Syu --noconfirm"
build_script:
- bash -lc "exec 0</dev/null && cd $APPVEYOR_BUILD_FOLDER && export MINGW64=/mingw64 && make SUBTARGET=ci PTR64=1 TOOLS=1 OPTIMIZE=3 IGNORE_GIT=1 -j3"
test_script:
- \projects\mame\mameci64.exe -validate
after_test:
- 7z a mameci64-appveyor-%APPVEYOR_REPO_BRANCH%-%APPVEYOR_REPO_COMMIT%-%APPVEYOR_BUILD_NUMBER%.7z %APPVEYOR_BUILD_FOLDER%\*.exe %APPVEYOR_BUILD_FOLDER%\artwork %APPVEYOR_BUILD_FOLDER%\bgfx %APPVEYOR_BUILD_FOLDER%\ctrlr %APPVEYOR_BUILD_FOLDER%\docs %APPVEYOR_BUILD_FOLDER%\hash %APPVEYOR_BUILD_FOLDER%\hlsl %APPVEYOR_BUILD_FOLDER%\ini %APPVEYOR_BUILD_FOLDER%\language %APPVEYOR_BUILD_FOLDER%\nl_examples %APPVEYOR_BUILD_FOLDER%\plugins %APPVEYOR_BUILD_FOLDER%\roms %APPVEYOR_BUILD_FOLDER%\samples
- appveyor PushArtifact mameci64-appveyor-%APPVEYOR_REPO_BRANCH%-%APPVEYOR_REPO_COMMIT%-%APPVEYOR_BUILD_NUMBER%.7z
test_script:
- \projects\mame\mameci64d.exe -validate
after_test:
- 7z a mameci64d-appveyor-%APPVEYOR_REPO_BRANCH%-%APPVEYOR_REPO_COMMIT%-%APPVEYOR_BUILD_NUMBER%.7z %APPVEYOR_BUILD_FOLDER%\*.exe %APPVEYOR_BUILD_FOLDER%\artwork %APPVEYOR_BUILD_FOLDER%\bgfx %APPVEYOR_BUILD_FOLDER%\ctrlr %APPVEYOR_BUILD_FOLDER%\docs %APPVEYOR_BUILD_FOLDER%\hash %APPVEYOR_BUILD_FOLDER%\hlsl %APPVEYOR_BUILD_FOLDER%\ini %APPVEYOR_BUILD_FOLDER%\language %APPVEYOR_BUILD_FOLDER%\nl_examples %APPVEYOR_BUILD_FOLDER%\plugins %APPVEYOR_BUILD_FOLDER%\roms %APPVEYOR_BUILD_FOLDER%\samples
- appveyor PushArtifact mameci64d-appveyor-%APPVEYOR_REPO_BRANCH%-%APPVEYOR_REPO_COMMIT%-%APPVEYOR_BUILD_NUMBER%.7z

View File

@ -1 +0,0 @@
eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.doN0hM3F1JcAqSRhxCrxPkeVEUj0cLHZ74LchLsP7JFE4-9udW0VQRRVEeQ8rrqtOb7X2am-hI2s9aLp6nq9duMdToFP5bJaUC0yxtAPCZbMgEZVB1BBxl04pgafswVXHUVR_yC4ToZlzuiKvsz1tjB2wFmyxowqqfbJILJVScobwYvIt5Mxp60A9vqBb1Xg77pR9EqYRmUiff_3Vrs4CEm2l39MXVuG8kwy9NOmJ3EStiVCh8iP0JwD-ZLBi3IMGGcGX73RyrNPAyFgwoXDEvSBflURc7ge3336wjfi2e7edeVmHBP-BhrI6Tng1BqyaNplZMtxZZ9vN-NqWYsXMg.4fOuhgSIsHgPVx6P.l9pmIM652sG1JvnBGjj-Aqr9k1U243w4acruslIkWcAzD9rxQOBK18011eQ3QyuFW4T1EjPvQMKflfGJNaPA74B2Is7HmSzG1NWrBkS0hv7uyf_WNwA83kdcoD0lyahtMG_td8AN4L7dlh0rh8BmOaPYHQ.VX42VcsvXuj9zYiZ41rzGg

View File

@ -1,48 +0,0 @@
# Build configure for https://www.tea-ci.org (fork of Drone CI with Msys2 support)
# 32-bit until release including https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=0aa738220bb9dea2ad479e484560767b36701947
build:
image: teaci/msys32
shell: mingw32
pull: true
branches:
-master
environment:
- SUBTARGET=tiny
- MINGW32=/c/msys32/mingw32
- MAME_EXE=mametiny.exe
- IGNORE_GIT=1
- TOOLS=1
# - SOURCES=src/mame/drivers/pacman.cpp
commands:
# - pacman -S -q --noprogressbar --noconfirm winpty
- make
- ./$MAME_EXE -validate && echo "Validation successful"
notify:
irc:
prefix: build
nick: $$IRC_USER
channel: mame-dev
server:
host: $$IRC_HOST
port: $$IRC_PORT
password: $$IRC_PASS
tls: true
when:
success: false
failure: true
change: true
# Need to regen secrets file (.drone.sec) from within tea-ci.org to enable
#notify:
# email:
# from: git@mamedev.org
# host: $$EMAIL_SERVER
# username: $$EMAIL_USERNAME
# password: $$EMAIL_PASSWORD
# recipients:
# - $$EMAIL_LISTADDR
# when:
# success: false
# failure: false
# change: true

40
.github/workflows/ci-linux.yml vendored Normal file
View File

@ -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

24
.github/workflows/ci-macos.yml vendored Normal file
View File

@ -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

58
.github/workflows/ci-windows.yml vendored Normal file
View File

@ -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

2
.gitignore vendored
View File

@ -11,6 +11,7 @@
/*
/*/
!/.github/
!/3rdparty/
!/android-project/
!/benchmarks/
@ -32,7 +33,6 @@
!/tests/
!/doxygen/
!/web/
!/.drone.yml
!/.gitattributes
!/.gitignore
!/.travis.yml

View File

@ -14,21 +14,8 @@ addons:
- libxi-dev
- qt5-default
update: true
homebrew:
packages:
- sdl2
- sdl2_ttf
update: true
jobs:
include:
- os: osx
osx_image: xcode11.6
compiler: clang
env: SUBTARGET=ci MAME=mameci64
- os: linux
arch: amd64
compiler: gcc
env: SUBTARGET=ci MAME=mameci64
- os: linux
arch: arm64
compiler: gcc
@ -45,17 +32,12 @@ jobs:
- arch: ppc64le
fast_finish: true
script:
- if [ $TRAVIS_OS_NAME == 'linux' ]; then
if [ $CC == 'clang' ]; then
- if [ $CC == 'clang' ]; then
make -j2 IGNORE_GIT=1 OVERRIDE_CXX="clang++-3.6" OVERRIDE_CC="clang-3.6" TOOLS=1 && ./$MAME -validate;
else make -j4 IGNORE_GIT=1 OPTIMIZE=0 OVERRIDE_CC="gcc-10" OVERRIDE_CXX="g++-10" TOOLS=1 && ./$MAME -validate;
fi
elif [ $TRAVIS_OS_NAME == 'osx' ]; then
unset LDOPTS && make -j2 OPTIMIZE=0 USE_LIBSDL=1 TOOLS=1 && ./$MAME -validate;
fi
branches:
only:
- master
notifications:
email: false

View File

@ -3,13 +3,13 @@
[![Join the chat at https://gitter.im/mamedev/mame](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mamedev/mame?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Build status for tiny build only, containing just core parts of project:
Build status:
| OS/Compiler | Status |
| OS/Compiler | Status |
| ------------- |:-------------:|
|Linux GCC / OSX Clang| [![Build Status](https://travis-ci.org/mamedev/mame.svg?branch=master)](https://travis-ci.org/mamedev/mame) |
|Windows MinGW | [![Build Status](https://tea-ci.org/api/badges/mamedev/mame/status.svg)](https://tea-ci.org/mamedev/mame) |
|Windows MSVC | [![Build status](https://ci.appveyor.com/api/projects/status/te0qy56b72tp5kmo?svg=true)](https://ci.appveyor.com/project/startaq/mame) |
| Linux/GCC and Clang | ![CI (Linux)](https://github.com/mamedev/mame/workflows/CI%20(Linux)/badge.svg) [![Build Status](https://travis-ci.org/mamedev/mame.svg?branch=master)](https://travis-ci.org/mamedev/mame) |
| Windows/GCC and MSVC | ![CI (Windows)](https://github.com/mamedev/mame/workflows/CI%20(Windows)/badge.svg) |
| macOS/Clang | ![CI (macOS)](https://github.com/mamedev/mame/workflows/CI%20(macOS)/badge.svg) |
Static analysis status for entire build (except for third-party parts of project):