forked from OpenGamers/abaddon
194 lines
7.2 KiB
YAML
194 lines
7.2 KiB
YAML
name: Abaddon CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
msys2:
|
|
name: msys2-mingw64
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
buildtype: [Debug, RelWithDebInfo, MinSizeRel]
|
|
mindeps: [false]
|
|
include:
|
|
- buildtype: RelWithDebInfo
|
|
mindeps: true
|
|
defaults:
|
|
run:
|
|
shell: msys2 {0}
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Setup MSYS2 (1)
|
|
uses: haya14busa/action-cond@v1
|
|
id: setupmsys
|
|
with:
|
|
cond: ${{ matrix.mindeps == true }}
|
|
if_true: >-
|
|
git
|
|
make
|
|
mingw-w64-x86_64-toolchain
|
|
mingw-w64-x86_64-cmake
|
|
mingw-w64-x86_64-ninja
|
|
mingw-w64-x86_64-sqlite3
|
|
mingw-w64-x86_64-nlohmann-json
|
|
mingw-w64-x86_64-curl
|
|
mingw-w64-x86_64-zlib
|
|
mingw-w64-x86_64-gtkmm3
|
|
if_false: >-
|
|
git
|
|
make
|
|
mingw-w64-x86_64-toolchain
|
|
mingw-w64-x86_64-cmake
|
|
mingw-w64-x86_64-ninja
|
|
mingw-w64-x86_64-sqlite3
|
|
mingw-w64-x86_64-nlohmann-json
|
|
mingw-w64-x86_64-curl
|
|
mingw-w64-x86_64-zlib
|
|
mingw-w64-x86_64-gtkmm3
|
|
mingw-w64-x86_64-libhandy
|
|
|
|
- name: Setup MSYS2 (2)
|
|
uses: msys2/setup-msys2@v2
|
|
with:
|
|
msystem: mingw64
|
|
update: true
|
|
install: ${{ steps.setupmsys.outputs.value }}
|
|
|
|
- name: Build
|
|
run: |
|
|
cmake -GNinja -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.buildtype }}
|
|
cmake --build build
|
|
|
|
- name: Setup Artifact
|
|
run: |
|
|
mkdir -p build/artifactdir/bin build/artifactdir/ssl/certs build/artifactdir/lib build/artifactdir/share/glib-2.0/schemas
|
|
cd build
|
|
cp *.exe artifactdir/bin
|
|
cd ..
|
|
cp /mingw64/ssl/certs/ca-bundle.crt build/artifactdir/ssl/certs
|
|
cp -r /mingw64/lib/gdk-pixbuf-2.0 build/artifactdir/lib
|
|
cp -r res/css res/res res/fonts build/artifactdir/bin
|
|
cp /mingw64/share/glib-2.0/schemas/gschemas.compiled build/artifactdir/share/glib-2.0/schemas
|
|
cat "ci/msys-deps.txt" | sed 's/\r$//' | xargs -I % cp /mingw64% build/artifactdir/bin || :
|
|
cp /usr/bin/msys-ffi-8.dll build/artifactdir/bin/libffi-8.dll
|
|
mkdir -p build/artifactdir/share/icons/Adwaita
|
|
cd build/artifactdir/share/icons/Adwaita
|
|
mkdir -p 16x16/actions 24x24/actions 32x32/actions 48x48/actions 64x64/actions 96x96/actions scalable/actions
|
|
cd ../../../../../
|
|
cat "ci/used-icons.txt" | sed 's/\r$//' | xargs -I % cp ci/gtk-for-windows/gtk-nsis-pack/share/icons/Adwaita/16x16/actions/%.symbolic.png build/artifactdir/share/icons/Adwaita/16x16/actions || :
|
|
cat "ci/used-icons.txt" | sed 's/\r$//' | xargs -I % cp ci/gtk-for-windows/gtk-nsis-pack/share/icons/Adwaita/24x24/actions/%.symbolic.png build/artifactdir/share/icons/Adwaita/24x24/actions || :
|
|
cat "ci/used-icons.txt" | sed 's/\r$//' | xargs -I % cp ci/gtk-for-windows/gtk-nsis-pack/share/icons/Adwaita/32x32/actions/%.symbolic.png build/artifactdir/share/icons/Adwaita/32x32/actions || :
|
|
cat "ci/used-icons.txt" | sed 's/\r$//' | xargs -I % cp ci/gtk-for-windows/gtk-nsis-pack/share/icons/Adwaita/48x48/actions/%.symbolic.png build/artifactdir/share/icons/Adwaita/48x48/actions || :
|
|
cat "ci/used-icons.txt" | sed 's/\r$//' | xargs -I % cp ci/gtk-for-windows/gtk-nsis-pack/share/icons/Adwaita/64x64/actions/%.symbolic.png build/artifactdir/share/icons/Adwaita/64x64/actions || :
|
|
cat "ci/used-icons.txt" | sed 's/\r$//' | xargs -I % cp ci/gtk-for-windows/gtk-nsis-pack/share/icons/Adwaita/96x96/actions/%.symbolic.png build/artifactdir/share/icons/Adwaita/96x96/actions || :
|
|
cat "ci/used-icons.txt" | sed 's/\r$//' | xargs -I % cp ci/gtk-for-windows/gtk-nsis-pack/share/icons/Adwaita/scalable/actions/%.svg build/artifactdir/share/icons/Adwaita/scalable/actions || :
|
|
|
|
- name: Upload build (1)
|
|
uses: haya14busa/action-cond@v1
|
|
id: buildname
|
|
with:
|
|
cond: ${{ matrix.mindeps == true }}
|
|
if_true: "${{ matrix.buildtype }}-mindeps"
|
|
if_false: "${{ matrix.buildtype }}"
|
|
|
|
- name: Upload build (2)
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: build-windows-msys2-${{ steps.buildname.outputs.value }}
|
|
path: build/artifactdir
|
|
|
|
mac:
|
|
name: macos-${{ matrix.buildtype }}
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
buildtype: [Debug, RelWithDebInfo]
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Fetch CMake
|
|
uses: lukka/get-cmake@v3.21.2
|
|
|
|
- name: Fetch dependencies
|
|
run: |
|
|
brew install gtkmm3
|
|
brew install nlohmann-json
|
|
brew install jpeg
|
|
|
|
- name: Build
|
|
uses: lukka/run-cmake@v3
|
|
with:
|
|
buildDirectory: ${{ runner.workspace }}/build
|
|
cmakeBuildType: ${{ matrix.buildtype }}
|
|
|
|
- name: Setup artifact files
|
|
run: |
|
|
mkdir "${{ runner.workspace }}/artifactdir"
|
|
cp "${{runner.workspace}}/build/abaddon" "${{ runner.workspace }}/artifactdir/abaddon"
|
|
cp -r "${{ github.workspace }}/res/css" "${{ runner.workspace }}/artifactdir/css"
|
|
cp -r "${{ github.workspace }}/res/res" "${{ runner.workspace }}/artifactdir/res"
|
|
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: build-macos-${{ matrix.buildtype }}
|
|
path: ${{ runner.workspace }}/artifactdir
|
|
|
|
linux:
|
|
name: linux-${{ matrix.buildtype }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
buildtype: [Debug, RelWithDebInfo, MinSizeRel]
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Fetch CMake
|
|
uses: lukka/get-cmake@v3.21.2
|
|
|
|
- name: Fetch dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
mkdir deps
|
|
cd deps
|
|
git clone https://github.com/nlohmann/json
|
|
cd json
|
|
git checkout bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d
|
|
mkdir build
|
|
cd build
|
|
cmake ..
|
|
make
|
|
sudo make install
|
|
sudo apt-get install libgtkmm-3.0-dev
|
|
sudo apt-get install libcurl4-gnutls-dev
|
|
|
|
- name: Build
|
|
uses: lukka/run-cmake@v3
|
|
env:
|
|
CC: gcc-9
|
|
CXX: g++-9
|
|
with:
|
|
cmakeAppendedArgs: -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9
|
|
buildDirectory: ${{ runner.workspace }}/build
|
|
cmakeBuildType: ${{ matrix.buildtype }}
|
|
|
|
- name: Setup artifact files
|
|
run: |
|
|
mkdir "${{ runner.workspace }}/artifactdir"
|
|
cp "${{runner.workspace}}/build/abaddon" "${{ runner.workspace }}/artifactdir/abaddon"
|
|
cp -r "${{ github.workspace }}/res/css" "${{ runner.workspace }}/artifactdir/css"
|
|
cp -r "${{ github.workspace }}/res/res" "${{ runner.workspace }}/artifactdir/res"
|
|
|
|
- name: Upload build
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: build-linux-${{ matrix.buildtype }}
|
|
path: ${{ runner.workspace }}/artifactdir
|