1
0
Fork 0

Add all OSes to the workflow

This commit is contained in:
krcroft 2019-12-10 17:12:14 -08:00 committed by Patryk Obara
parent 343c85fa17
commit d22d48b527
6 changed files with 92 additions and 252 deletions

View file

@ -1,121 +0,0 @@
name: Linux all configurations
on:
# push
schedule: [cron: '15 4 * * *']
jobs:
build_ubuntu:
name: ${{ matrix.conf.name }}
runs-on: ubuntu-latest
strategy:
matrix:
conf:
- name: With ALSA MIDI
configure_flags: --enable-alsa-midi
with_packages: libasound2-dev
max_warnings: 5194
- name: With debugger
configure_flags: --enable-debug
with_packages: libncurses-dev libsdl-net1.2-dev
max_warnings: 6013
- name: With debugger-heavy
configure_flags: --enable-debug
with_packages: libncurses-dev libsdl-net1.2-dev
max_warnings: 6013
- name: Without core-inline
configure_flags: --disable-core-inline
max_warnings: 5194
- name: Without dynamic-x86
configure_flags: --disable-dynamic-x86
max_warnings: 5197
- name: Without dynrec
configure_flags: --disable-dynrec
max_warnings: 5194
- name: Without FPU
configure_flags: --disable-fpu
max_warnings: 5182
- name: Without FPU-x64
configure_flags: --disable-fpu-x64
max_warnings: 5200
- name: Without FPU-x86
configure_flags: --disable-fpu-x86
max_warnings: 5200
- name: Without OpenGL
configure_flags: --disable-opengl
max_warnings: 5195
- name: Without screenshots
configure_flags: --disable-screenshots
max_warnings: 5178
- name: Without SDL_Net
without_packages: libsdl-net1.2-dev
max_warnings: 5194
- name: Without unaligned memory
configure_flags: --disable-unaligned-memory
max_warnings: 5016
steps:
- uses: actions/checkout@v1
- run: sudo apt-get -y update
- name: Install C++ development tools
run: sudo apt-get -y install autoconf-archive libtool build-essential g++ libsdl1.2-dev libopusfile-dev
- name: Add libraries
if: matrix.conf.with_packages
run: sudo apt-get -y install ${{ matrix.conf.with_packages }}
- name: Remove libraries
if: matrix.conf.without_packages
run: sudo apt-get -y purge ${{ matrix.conf.without_packages }}
- name: Build
run: |
set -xeu
./autogen.sh
export CFLAGS="\
-g \
-Og \
-pedantic \
-pipe \
-Wall \
-Wcast-align \
-Wdouble-promotion \
-Wduplicated-branches \
-Wduplicated-cond \
-Wextra \
-Wformat=2 \
-Wlogical-op \
-Wmisleading-indentation \
-Wnull-dereference \
-Wshadow \
-Wunused"
export CXXFLAGS="\
${CFLAGS} \
-Weffc++ \
-Wnon-virtual-dtor \
-Woverloaded-virtual \
-Wuseless-cast"
g++ --version
./configure ${{ matrix.conf.configure_flags }}
make \
--jobs="$(nproc)" \
--output-sync=line \
|& tr -cd '\11\12\15\40-\176' \
| tee build.log
- name: Summarize warnings
env:
MAX_WARNINGS: ${{ matrix.conf.max_warnings }}
run: ./scripts/count-warnings.py build.log

89
.github/workflows/config.yml vendored Normal file
View file

@ -0,0 +1,89 @@
name: Config heavy
on:
# push
schedule: [cron: '15 5 * * *']
jobs:
config_all:
name: ${{ matrix.system.name }} ${{ matrix.conf.configure_flags }} ${{ matrix.conf.without_packages }}
runs-on: ${{ matrix.system.os }}
strategy:
# max-parallel: 1
matrix:
system:
- name: Windows
os: windows-latest
compiler: gcc
- name: macOS
os: macos-latest
compiler: clang
- name: Linux
os: ubuntu-latest
compiler: gcc
# Disabled temporarily due to https://github.com/dreamer/dosbox-staging/issues/86
# - configure_flags: --enable-debug
# - configure_flags: --enable-debug-heavy
conf:
- configure_flags: --enable-alsa-midi
- configure_flags: --disable-core-inline
- configure_flags: --disable-dynamic-x86
- configure_flags: --disable-dynrec
- configure_flags: --disable-fpu
- configure_flags: --disable-fpu-x64
- configure_flags: --disable-fpu-x86
- configure_flags: --disable-opengl
- configure_flags: --disable-screenshots
- configure_flags: --disable-unaligned-memory
- without_packages: -x net
- without_packages: -x curses
- without_packages: -x net -x curses
env:
CHERE_INVOKING: yes
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Get Date
if: matrix.system.name == 'Windows'
id: get-date
shell: bash
run: echo ::set-output name=date::$(date +%Y-%W)
- uses: actions/cache@v1
if: matrix.system.name == 'Windows'
id: cache-msys2
with:
path: 'C:/tools/msys64'
key: msys2-GCC-64-${{ steps.get-date.outputs.date }}-1
- name: Install MSYS2 (Windows)
if: matrix.system.name == 'Windows' && steps.cache-msys2.outputs.cache-hit != 'true'
run: choco install msys2 --no-progress
- name: Install dependencies ${{ matrix.conf.without_packages }} (Windows)
if: matrix.system.name == 'Windows' && steps.cache-msys2.outputs.cache-hit != 'true'
shell: python scripts\msys-bash.py {0}
run: |
scripts/list-build-dependencies.sh -m msys2 -c gcc ${{ matrix.conf.without_packages }} | xargs pacman -S --noconfirm
.github/scripts/shrink-msys2.sh
- name: Install dependencies ${{ matrix.conf.without_packages }} (Linux)
if: matrix.system.name == 'Linux'
run: |
sudo apt-get -y update
sudo apt-get install -y $(./scripts/list-build-dependencies.sh -m apt -c gcc ${{ matrix.conf.without_packages }})
- name: Install dependencies ${{ matrix.conf.without_packages }} (macOS)
if: matrix.system.name == 'macOS'
run: brew install $(./scripts/list-build-dependencies.sh -m brew -c clang ${{ matrix.conf.without_packages }})
- name: Build ${{ matrix.conf.configure_flags }} (Windows)
if: matrix.system.name == 'Windows'
shell: python scripts\msys-bash.py {0}
run: scripts/build.sh -c ${{ matrix.system.compiler }} -t debug --bin-path /mingw64/bin ${{ matrix.conf.configure_flags }}
- name: Build ${{ matrix.conf.configure_flags }} (non-Windows)
if: matrix.system.name != 'Windows'
run: ./scripts/build.sh -c ${{ matrix.system.compiler }} -t debug ${{ matrix.conf.configure_flags }}

View file

@ -1,46 +0,0 @@
name: Linux builds
on: push
env:
MAX_WARNINGS_GCC_6_Debug: 378
MAX_WARNINGS_GCC_6_Release: 661
MAX_WARNINGS_GCC_7_Debug: 380
MAX_WARNINGS_GCC_7_Release: 329
MAX_WARNINGS_GCC_8_Debug: 380
MAX_WARNINGS_GCC_8_Release: 330
MAX_WARNINGS_GCC_9_Debug: 403
MAX_WARNINGS_GCC_9_Release: 358
MAX_WARNINGS_Clang_7_Debug: 193
MAX_WARNINGS_Clang_7_Release: 193
MAX_WARNINGS_Clang_8_Debug: 193
MAX_WARNINGS_Clang_8_Release: 193
jobs:
build_matrix:
name: ${{ matrix.compiler }}-${{ matrix.compiler_version }}
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [Clang, GCC]
compiler_version: [6, 7, 8, 9]
# build_type: [Debug, Release]
exclude:
- compiler: Clang
compiler_version: 6
- compiler: Clang
compiler_version: 9
steps:
- uses: actions/checkout@v1
- run: sudo apt-get update
- name: Install C++ compiler and libraries
run: sudo apt-get install -y $(./scripts/list-build-dependencies.sh -m apt -c ${{ matrix.compiler }} -v ${{ matrix.compiler_version }})
- name: Log environment
run: ./scripts/log-env.sh
- name: Release build
run: ./scripts/build.sh --compiler ${{ matrix.compiler }} --version-postfix ${{ matrix.compiler_version }} --build-type Release
- name: Release warnings
run: ./scripts/count-warnings.py -m $MAX_WARNINGS_${{ matrix.compiler }}_${{ matrix.compiler_version }}_Release build.log
- name: Debug build
run: ./scripts/build.sh --compiler ${{ matrix.compiler }} --version-postfix ${{ matrix.compiler_version }} --build-type Debug
- name: Debug warnings
run: ./scripts/count-warnings.py -m $MAX_WARNINGS_${{ matrix.compiler }}_${{ matrix.compiler_version }}_Debug build.log

View file

@ -1,84 +0,0 @@
name: Windows builds
on: push
env:
MAX_WARNINGS_GCC_32bit_Debug: 320
MAX_WARNINGS_GCC_32bit_Release: 284
MAX_WARNINGS_GCC_64bit_Debug: 405
MAX_WARNINGS_GCC_64bit_Release: 369
MAX_WARNINGS_Clang_32bit_Debug: 129
MAX_WARNINGS_Clang_32bit_Release: 129
MAX_WARNINGS_Clang_64bit_Debug: 190
MAX_WARNINGS_Clang_64bit_Release: 190
jobs:
build_msvc_matrix:
name: MSVC 32-bit
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Install packages
shell: pwsh
run: |
vcpkg install libpng sdl1 sdl1-net opusfile
vcpkg integrate install
- name: Log environment
shell: pwsh
run: .\scripts\log-env.ps1
- name: Release build
shell: pwsh
env:
PATH: '${env:PATH};C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64'
run: |
cd vs
MSBuild -m dosbox.sln -p:Configuration=Release
- name: Debug build
shell: pwsh
env:
PATH: '${env:PATH};C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64'
run: |
cd vs
MSBuild -m dosbox.sln -p:Configuration=Debug
build_msys2_matrix:
name: ${{ matrix.compiler }} ${{ matrix.bits }}-bit
runs-on: windows-latest
strategy:
matrix:
compiler: [GCC, Clang]
bits: [32, 64]
env:
CHERE_INVOKING: yes
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
id: cache-msys2
if: matrix.compiler == 'GCC'
with:
path: 'C:/tools/msys64'
key: msys2-${{ matrix.compiler }}-${{ matrix.bits }}-2019-v11}
- name: Install MSYS2
if: steps.cache-msys2.outputs.cache-hit != 'true'
run: choco install msys2 --no-progress
- name: Install C++ compiler and libraries
if: steps.cache-msys2.outputs.cache-hit != 'true'
shell: python scripts\msys-bash.py {0}
run: ./scripts/list-build-dependencies.sh -m msys2 -c ${{ matrix.compiler }} -b ${{ matrix.bits }} | xargs pacman -S --noconfirm
- name: Shrink MSYS2 for cache
if: matrix.compiler == 'GCC' && steps.cache-msys2.outputs.cache-hit != 'true'
shell: python scripts\msys-bash.py {0}
run: ./.github/scripts/shrink-msys2.sh
- name: Log environment
shell: python scripts\msys-bash.py {0}
run: ./scripts/log-env.sh
- name: Release build
shell: python scripts\msys-bash.py {0}
run: ./scripts/build.sh --compiler ${{ matrix.compiler }} --build-type Release --bin-path /mingw${{ matrix.bits }}/bin
- name: Release warnings
run: '.\scripts\count-warnings.py -m $env:MAX_WARNINGS_${{ matrix.compiler }}_${{ matrix.bits }}bit_Release build.log'
- name: Debug build
shell: python scripts\msys-bash.py {0}
run: ./scripts/build.sh --compiler ${{ matrix.compiler }} --build-type Debug --bin-path /mingw${{ matrix.bits }}/bin
- name: Debug warnings
run: '.\scripts\count-warnings.py -m $env:MAX_WARNINGS_${{ matrix.compiler }}_${{ matrix.bits }}bit_Debug build.log'

View file

@ -29,7 +29,9 @@ function autogen() {
function configure() {
if [[ ! -f Makefile || ! -f .previous_build || configure -nt Makefile ]]; then
export CXXFLAGS="${CFLAGS} ${CXXONLY}"
set -x
./configure --enable-core-inline ${configure_additions[*]}
set +x
fi
}

View file

@ -2,6 +2,6 @@
# MSYS2 only supports the current latest releases of Clang and GCC, so we disable version customization
packages+=(autogen autoconf base-devel automake-wrapper binutils)
pkg_type=$([[ "${bits}" == "64" ]] && echo "x86_64" || echo "i686")
for pkg in pkg-config libtool libpng zlib ncurses SDL SDL_net opusfile; do
for pkg in pkg-config libtool libpng zlib ncurses pdcurses SDL SDL_net opusfile; do
packages+=("mingw-w64-${pkg_type}-${pkg}")
done