Browse Source

Replace AppVeyor with GitHub Actions

pull/4933/head
Gleb Mazovetskiy 4 years ago committed by Anders Jenbo
parent
commit
1791e1f71c
  1. 2
      .github/workflows/Linux_x86.yml
  2. 2
      .github/workflows/Linux_x86_64_SDL1.yml
  3. 2
      .github/workflows/Linux_x86_64_test.yml
  4. 42
      .github/workflows/Windows_MSVC_x64.yml
  5. 6
      .github/workflows/Windows_MinGW_x64.yml
  6. 2
      .github/workflows/Windows_MinGW_x86.yml
  7. 41
      .github/workflows/xbox_one.yml
  8. 3
      CMakeLists.txt
  9. 84
      CMakePresets.json
  10. 9
      README.md
  11. 58
      appveyor.yml

2
.github/workflows/Linux_x86.yml

@ -1,4 +1,4 @@
name: Linux_x86
name: Linux x86
on:
push:

2
.github/workflows/Linux_x86_64_SDL1.yml

@ -1,4 +1,4 @@
name: Linux_x86_64_SDL1
name: Linux x64 SDL1
on:
push:

2
.github/workflows/Linux_x86_64_test.yml

@ -1,4 +1,4 @@
name: Linux_x86_64_test
name: Linux x64 Tests
on:
push:

42
.github/workflows/Windows_MSVC_x64.yml

@ -0,0 +1,42 @@
name: Windows MSVC x64
on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
- name: Install latest CMake
uses: lukka/get-cmake@latest
- name: Restore or setup vcpkg
uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: '98f8d00e89fb6a8019c2045cfa1edbe9d92d3405'
- name: Run CMake consuming CMakePresets.json and vcpkg.json by mean of vcpkg.
uses: lukka/run-cmake@v10
with:
configurePreset: 'ninja-vcpkg-debug'
buildPreset: 'ninja-vcpkg-debug'
testPreset: 'ninja-vcpkg-debug'
- name: Upload-Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
with:
name: devilutionx.exe
path: build-ninja-vcpkg-debug/devilutionx.exe

6
.github/workflows/Windows_x64.yml → .github/workflows/Windows_MinGW_x64.yml

@ -1,4 +1,4 @@
name: Windows_x64
name: Windows MinGW x64
on:
push:
@ -39,7 +39,7 @@ jobs:
with:
name: devilutionx_x64.zip
path: build/devilutionx.zip
- name: Upload artifacts as release in storage repo
if: ${{ !env.ACT && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
uses: svenstaro/upload-release-action@v2
@ -50,4 +50,4 @@ jobs:
asset_name: artifacts.zip
tag: "WIN64-${{ github.sha }}"
overwrite: true
body: ${{ github.event.head_commit.message }}
body: ${{ github.event.head_commit.message }}

2
.github/workflows/Windows_x86.yml → .github/workflows/Windows_MinGW_x86.yml

@ -1,4 +1,4 @@
name: Windows_x86
name: Windows MinGW x86
on:
push:

41
.github/workflows/xbox_one.yml

@ -0,0 +1,41 @@
name: Xbox One / Series
on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.1
with:
msbuild-architecture: x64
- name: Build
shell: cmd
run: |
cd ${{ github.workspace }}\Packaging\xbox-one
build.bat
- name: Upload-Package
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v3
with:
name: devilutionx-xbox-one.zip
if-no-files-found: error
path: |
build/uwp-project/AppxPackages/**/Microsoft.VCLibs.x64.*.appx
build/uwp-project/Release/**/devilutionX_*_x64.appx

3
CMakeLists.txt

@ -188,7 +188,8 @@ endif()
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif()
if(DEVILUTIONX_DISABLE_RTTI)

84
CMakePresets.json

@ -0,0 +1,84 @@
{
"version": 3,
"cmakeMinimumRequired": {
"major": 3,
"minor": 19,
"patch": 0
},
"configurePresets": [
{
"name": "ninja-vcpkg",
"displayName": "Ninja with VcPkg Configure Settings",
"description": "Configure with vcpkg toolchain",
"binaryDir": "${sourceDir}/build-${presetName}",
"generator": "Ninja",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": {
"type": "FILEPATH",
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
}
},
{
"name": "ninja-vcpkg-debug",
"displayName": "Ninja with VcPkg Configure Settings with CMAKE_BUILD_TYPE=RelWithDebInfo",
"inherits": "ninja-vcpkg",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "ninja-vcpkg-relwithdebinfo",
"displayName": "Ninja with VcPkg Configure Settings with CMAKE_BUILD_TYPE=RelWithDebInfo",
"inherits": "ninja-vcpkg",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "ninja-vcpkg-discord-relwithdebinfo",
"displayName": "Ninja with VcPkg Configure Settings with DISCORD_INTEGRATION=ON CMAKE_BUILD_TYPE=RelWithDebInfo",
"inherits": "ninja-vcpkg-relwithdebinfo",
"cacheVariables": {
"DISCORD_INTEGRATION": {
"type": "BOOL",
"value": "ON"
}
}
}
],
"buildPresets": [
{
"name": "ninja-vcpkg-debug",
"configurePreset": "ninja-vcpkg-debug",
"displayName": "Build ninja-vcpkg-debug",
"description": "Build ninja-vcpkg-debug Configuration"
},
{
"name": "ninja-vcpkg-relwithdebinfo",
"configurePreset": "ninja-vcpkg-relwithdebinfo",
"displayName": "Build ninja-vcpkg-relwithdebinfo",
"description": "Build ninja-vcpkg-relwithdebinfo Configuration"
},
{
"name": "ninja-vcpkg-discord-relwithdebinfo",
"configurePreset": "ninja-vcpkg-discord-relwithdebinfo",
"displayName": "Build ninja-vcpkg-discord-relwithdebinfo",
"description": "Build ninja-vcpkg-discord-relwithdebinfo Configuration"
}
],
"testPresets": [
{
"name": "ninja-vcpkg-debug",
"configurePreset": "ninja-vcpkg-debug"
},
{
"name": "ninja-vcpkg-relwithdebinfo",
"configurePreset": "ninja-vcpkg-relwithdebinfo"
},
{
"name": "ninja-vcpkg-discord-relwithdebinfo",
"configurePreset": "ninja-vcpkg-discord-relwithdebinfo"
}
]
}

9
README.md

@ -51,16 +51,17 @@ If you want to help test the latest state of the next version you can fetch the
[![Linux x86](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86.yml?query=branch%3Amaster)
[![Linux x86-64 SDL1](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86_64_SDL1.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Linux_x86_64_SDL1.yml?query=branch%3Amaster)
[![MacOSX](https://github.com/diasurgical/devilutionX/actions/workflows/MacOSX.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/MacOSX.yml?query=branch%3Amaster)
[![Windows x64](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_x64.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_x64.yml?query=branch%3Amaster)
[![Windows x86](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_x86.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_x86.yml?query=branch%3Amaster)
[![Windows x64](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MSVC_x64.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MSVC_x64.yml?query=branch%3Amaster)
[![Windows MinGW x64](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MinGW_x64.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MinGW_x64.yml?query=branch%3Amaster)
[![Windows MinGW x86](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MinGW_x86.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Windows_MinGW_x86.yml?query=branch%3Amaster)
[![Android](https://github.com/diasurgical/devilutionX/actions/workflows/Android.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/Android.yml?query=branch%3Amaster)
[![iOS](https://github.com/diasurgical/devilutionX/actions/workflows/iOS.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/iOS.yml?query=branch%3Amaster)
[![PS4](https://github.com/diasurgical/devilutionX/actions/workflows/PS4.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/PS4.yml?query=branch%3Amaster)
[![Original Xbox](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_nxdk.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_nxdk.yml?query=branch%3Amaster)
[![Xbox One/Series](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_one.yml/badge.svg)](https://github.com/diasurgical/devilutionX/actions/workflows/xbox_one.yml?query=branch%3Amaster)
Linux x86-64, Switch, Vita, 3DS, Amiga, [![CircleCI](https://circleci.com/gh/diasurgical/devilutionX.svg?style=shield)](https://app.circleci.com/pipelines/github/diasurgical/devilutionX?branch=master)
Xbox One/Series, MSVC [![AppVeyor](https://ci.appveyor.com/api/projects/status/1a0jus2372qvksht/branch/master?svg=true)](https://ci.appveyor.com/project/AJenbo/devilutionx)
# Building from Source
Want to compile the program by yourself? Great! Simply follow the [build instructions](./docs/building.md).

58
appveyor.yml

@ -1,58 +0,0 @@
version: 1.1.{build}
pull_requests:
do_not_increment_build_number: true
environment:
matrix:
- job_name: windows
appveyor_build_worker_image: Visual Studio 2022
- job_name: uwp
appveyor_build_worker_image: Visual Studio 2022
for:
-
matrix:
only:
- job_name: windows
cache: '%LOCALAPPDATA%\vcpkg\archives'
install:
- if not exist C:\Tools\vcpkg mkdir C:\Tools\vcpkg
- cd C:\Tools\vcpkg
- git pull
- .\bootstrap-vcpkg.bat
- cd %APPVEYOR_BUILD_FOLDER%
before_build:
- cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake .
build:
project: $(APPVEYOR_BUILD_FOLDER)\$(APPVEYOR_PROJECT_NAME).sln
parallel: true
verbosity: minimal
artifacts:
- path: Debug\devilutionx.exe
name: devilutionx.exe
-
matrix:
only:
- job_name: uwp
before_build:
- cd %APPVEYOR_BUILD_FOLDER%\Packaging\xbox-one
- if exist ..\..\build rd /s /q ..\..\build
build_script:
- build.bat
after_build:
- cd %APPVEYOR_BUILD_FOLDER%
artifacts:
- path: devilutionx.zip
name: devilutionx.zip
Loading…
Cancel
Save