Skip to content

Commit 1510d77

Browse files
committed
drop script
1 parent efbc1b4 commit 1510d77

File tree

3 files changed

+72
-20
lines changed

3 files changed

+72
-20
lines changed

.github/workflows/build-and-test.yml

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,74 @@ name: Build and Test
22

33
on:
44
push:
5-
branches: [ "master", "migrate-ci" ]
5+
branches: [ "main", "migrate-ci" ]
66
pull_request:
7-
branches: [ "master" ]
7+
branches: [ "main" ]
8+
# Allow to run manually
9+
workflow_dispatch:
810

911
env:
1012
BUILD_TYPE: Release
13+
XDG_RUNTIME_DIR: /tmp/openrw-runtimedir
1114

1215
jobs:
13-
build-and-test:
16+
archlinux-build-and-test:
1417
runs-on: ubuntu-latest
15-
strategy:
16-
matrix:
17-
distro: [ "ubuntu", "fedora", "archlinux" ]
18+
container:
19+
image: docker.io/archlinux/archlinux:latest
1820
steps:
21+
- name: Install dependencies
22+
run: |
23+
pacman -Syy --noconfirm \
24+
git-core core/gcc extra/llvm extra/clang make ninja curl \
25+
extra/boost extra/cmake extra/ffmpeg extra/bullet community/glm \
26+
extra/openal extra/sdl2 extra/qt5-base extra/freetype2
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
submodules: recursive
31+
- name: Make runtime directory
32+
run: mkdir -p ${XDG_RUNTIME_DIR}
33+
- name: Build and test
34+
run: mkdir build && cd build && ctest -VV -S ../cmake/ctest/script_ci.ctest
35+
fedora-build-and-test:
36+
runs-on: ubuntu-latest
37+
container:
38+
image: quay.io/fedora/fedora:latest
39+
steps:
40+
- name: Install dependencies
41+
run: |
42+
dnf install -y git-core boost-devel gcc gcc-c++ clang llvm lcov curl \
43+
boost-devel cmake make ninja-build bullet-devel ffmpeg-free-devel \
44+
glm-devel openal-soft-devel SDL2-devel qt5-qtbase-devel \
45+
freetype-devel libasan
1946
- name: Checkout
2047
uses: actions/checkout@v4
48+
with:
49+
submodules: recursive
50+
- name: Make runtime directory
51+
run: mkdir -p ${XDG_RUNTIME_DIR}
52+
- name: Build and test
53+
run: mkdir build && cd build && ctest -VV -S ../cmake/ctest/script_ci.ctest
54+
ubuntu-build-and-test:
55+
runs-on: ubuntu-latest
56+
steps:
2157
- 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"
58+
run: |
59+
sudo apt-get update && \
60+
sudo apt-get install --no-install-recommends --no-upgrade -y \
61+
git-core build-essential cmake ninja-build clang llvm lcov curl \
62+
libavcodec-dev libavformat-dev libboost-program-options-dev \
63+
libboost-system-dev libbullet-dev libglm-dev libopenal-dev \
64+
libsdl2-dev libboost-test-dev libqt5opengl5-dev libfreetype6-dev \
65+
iwyu qtbase5-dev qt5-qmake
66+
env:
67+
DEBIAN_FRONTEND: noninteractive
68+
- name: Checkout
69+
uses: actions/checkout@v4
70+
with:
71+
submodules: recursive
72+
- name: Make runtime directory
73+
run: mkdir -p ${XDG_RUNTIME_DIR}
74+
- name: Build and test
75+
run: mkdir build && cd build && ctest -VV -S ../cmake/ctest/script_ci.ctest

cmake/ctest/utils.ctest

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@ function(openrw_build_name BUILDER_NAME_RES BUILD_NAME_RES)
7474
endif()
7575

7676
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)
8586
elseif("$ENV{APPVEYOR}")
8687
message(STATUS "AppVeyor detected")
8788
set(BUILDER_NAME "AppVeyor")

cmake_configure.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ if(TEST_COVERAGE)
144144
if(_RE_REFSPEC)
145145
set(GIT_BRANCH "${CMAKE_MATCH_1}")
146146
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}")
150150
else()
151151
message("Git branch unknown: uploading coverage might nog work")
152152
endif()

0 commit comments

Comments
 (0)