File tree Expand file tree Collapse file tree 3 files changed +30
-20
lines changed Expand file tree Collapse file tree 3 files changed +30
-20
lines changed Original file line number Diff line number Diff line change @@ -2,23 +2,32 @@ name: Build and Test
2
2
3
3
on :
4
4
push :
5
- branches : [ "master ", "migrate-ci" ]
5
+ branches : [ "main ", "migrate-ci" ]
6
6
pull_request :
7
- branches : [ "master" ]
7
+ branches : [ "main" ]
8
+ # Allow to run manually
9
+ workflow_dispatch :
8
10
9
11
env :
10
12
BUILD_TYPE : Release
11
13
12
14
jobs :
13
15
build-and-test :
14
16
runs-on : ubuntu-latest
15
- strategy :
16
- matrix :
17
- distro : [ "ubuntu", "fedora", "archlinux" ]
17
+ container :
18
+ image : quay.io/fedora/fedora:latest
19
+ env :
20
+ XDG_RUNTIME_DIR : /tmp
18
21
steps :
22
+ - name : Install dependencies
23
+ run : |
24
+ dnf install -y git-core boost-devel gcc gcc-c++ clang llvm lcov curl \
25
+ boost-devel cmake make ninja-build bullet-devel ffmpeg-free-devel \
26
+ glm-devel openal-soft-devel SDL2-devel qt5-qtbase-devel \
27
+ freetype-devel libasan
19
28
- name : Checkout
20
29
uses : actions/checkout@v4
21
- - name : Install dependencies
22
- run : sudo apt-get update && sudo apt-get install -yq python3
23
- - name : Build and Test
24
- run : scripts/docker/docker_travis.sh "${{ matrix.distro }}_latest.docker"
30
+ with :
31
+ submodules : recursive
32
+ - name : Build and test
33
+ run : mkdir build && cd build && ctest -VV -S ../cmake/ctest/script_ci.ctest
Original file line number Diff line number Diff line change @@ -74,14 +74,15 @@ function(openrw_build_name BUILDER_NAME_RES BUILD_NAME_RES)
74
74
endif()
75
75
76
76
if(MODEL_NAME STREQUAL "continuous")
77
- if("$ENV{TRAVIS}")
78
- message(STATUS "Travis detected")
79
- set(BUILDER_NAME "Travis")
80
- set(REPO_NAME "$ENV{TRAVIS_REPO_SLUG}")
81
- set(REPO_BRANCH "$ENV{TRAVIS_BRANCH}")
82
- set(GIT_HASH "$ENV{TRAVIS_COMMIT}")
83
- set(_EVENT_TYPE "$ENV{TRAVIS_EVENT_TYPE}")
84
- set(SUBMIT TRUE)
77
+ if("$ENV{GITHUB_ACTIONS}")
78
+ message(STATUS "GitHub Actions detected")
79
+ set(BUILDER_NAME "GitHub Actions")
80
+ set(REPO_NAME "$ENV{GITHUB_REPOSITORY}")
81
+ set(REPO_BRANCH "$ENV{GITHUB_REF}")
82
+ set(GIT_HASH "$ENV{GITHUB_SHA}")
83
+ set(_EVENT_TYPE "$ENV{GITHUB_EVENT_NAME}")
84
+ # FIXME: enable submit
85
+ set(SUBMIT FALSE)
85
86
elseif("$ENV{APPVEYOR}")
86
87
message(STATUS "AppVeyor detected")
87
88
set(BUILDER_NAME "AppVeyor")
Original file line number Diff line number Diff line change @@ -144,9 +144,9 @@ if(TEST_COVERAGE)
144
144
if (_RE_REFSPEC )
145
145
set (GIT_BRANCH "${CMAKE_MATCH_1} " )
146
146
message (STATUS "Git branch detected from .git directory: ${GIT_BRANCH} " )
147
- elseif (DEFINED ENV{TRAVIS_BRANCH } )
148
- set (GIT_BRANCH "$ENV{TRAVIS_BRANCH } " )
149
- message (STATUS "Git branch detected from TRAVIS_BRANCH environment variable: ${GIT_BRANCH} " )
147
+ elseif (DEFINED ENV{GITHUB_REF } )
148
+ set (GIT_BRANCH "$ENV{GITHUB_REF } " )
149
+ message (STATUS "Git branch detected from GITHUB_BRANCH environment variable: ${GIT_BRANCH} " )
150
150
else ()
151
151
message ("Git branch unknown: uploading coverage might nog work" )
152
152
endif ()
You can’t perform that action at this time.
0 commit comments