Skip to content

Commit

Permalink
Merge pull request adventuregamestudio#2091 from ericoporto/ci-add-gh…
Browse files Browse the repository at this point in the history
…-actions

Ci add gh actions
  • Loading branch information
ivan-mogilko committed Aug 24, 2023
2 parents ae42796 + 6fe7919 commit e39808c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ build_windows_task:
path: Solutions/.build/*/*

build_linux_cmake_task:
skip: "!changesInclude('CMake/**')"
only_if: $CIRRUS_RELEASE == ''
container:
dockerfile: ci/linux/Dockerfile
Expand Down Expand Up @@ -160,6 +161,7 @@ build_linux_make_task:
path: bin_*/*

build_macos_task:
skip: "!changesInclude('OSX/**')"
only_if: $CIRRUS_RELEASE == ''
macos_instance:
matrix:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: GitHub Actions Build

on: [push, pull_request]

env:
BUILD_TYPE: Release

jobs:
build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- { name: Windows, os: windows-latest }
- { name: Ubuntu, os: ubuntu-latest }
- { name: macOS, os: macos-latest }

steps:
- uses: actions/checkout@v3

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DAGS_BUILD_TOOLS=1 -DAGS_TESTS=1 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 2

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: binaries-${{ matrix.platform.name }}
path: |
${{github.workspace}}/build/${{env.BUILD_TYPE}}/ags.exe
${{github.workspace}}/build/ags
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ message( "AGS_DESKTOP:" ${AGS_DESKTOP} )
message("----------------------------------------")

if (WIN32 AND NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
message(FATAL_ERROR "Windows builds only support 32bit for now")
message(WARNING "Windows builds only support 32bit for now, this is experimental.")
endif()

if(LINUX)
Expand Down

0 comments on commit e39808c

Please sign in to comment.