Skip to content

Commit 30f8b58

Browse files
committed
drop script
1 parent efbc1b4 commit 30f8b58

File tree

3 files changed

+77
-19
lines changed

3 files changed

+77
-19
lines changed

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

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