Skip to content

Commit

Permalink
drop script
Browse files Browse the repository at this point in the history
  • Loading branch information
Lihis committed Jan 7, 2025
1 parent 66fbb42 commit cfc1f20
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@ name: Build and Test

on:
push:
branches: [ "master", "migrate-ci" ]
branches: [ "main", "migrate-ci" ]
pull_request:
branches: [ "master" ]
branches: [ "main" ]
# Allow to run manually
workflow_dispatch:

env:
BUILD_TYPE: Release

jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [ "ubuntu", "fedora", "archlinux" ]
container:
image: quay.io/fedora/fedora:latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -yq python3
- name: Build and Test
run: scripts/docker/docker_travis.sh "${{ matrix.distro }}_latest.docker"
run: |
dnf install -y boost-devel gcc gcc-c++ clang llvm lcov curl \
boost-devel cmake make ninja-build bullet-devel ffmpeg-free-devel \
glm-devel openal-soft-devel SDL2-devel qt5-qtbase-devel \
freetype-devel libasan
- name: Build and test
run: mkdir build && ctest -VV -S cmake/ctest/script_ci.ctest
env:
XDG_RUNTIME_DIR: /tmp
17 changes: 9 additions & 8 deletions cmake/ctest/utils.ctest
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ function(openrw_build_name BUILDER_NAME_RES BUILD_NAME_RES)
endif()

if(MODEL_NAME STREQUAL "continuous")
if("$ENV{TRAVIS}")
message(STATUS "Travis detected")
set(BUILDER_NAME "Travis")
set(REPO_NAME "$ENV{TRAVIS_REPO_SLUG}")
set(REPO_BRANCH "$ENV{TRAVIS_BRANCH}")
set(GIT_HASH "$ENV{TRAVIS_COMMIT}")
set(_EVENT_TYPE "$ENV{TRAVIS_EVENT_TYPE}")
set(SUBMIT TRUE)
if("$ENV{GITHUB_ACTIONS}")
message(STATUS "GitHub Actions detected")
set(BUILDER_NAME "GitHub Actions")
set(REPO_NAME "$ENV{GITHUB_REPOSITORY}")
set(REPO_BRANCH "$ENV{GITHUB_REF}")
set(GIT_HASH "$ENV{GITHUB_SHA}")
set(_EVENT_TYPE "$ENV{GITHUB_EVENT_NAME}")
# FIXME: enable submit
set(SUBMIT FALSE)
elseif("$ENV{APPVEYOR}")
message(STATUS "AppVeyor detected")
set(BUILDER_NAME "AppVeyor")
Expand Down
6 changes: 3 additions & 3 deletions cmake_configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ if(TEST_COVERAGE)
if(_RE_REFSPEC)
set(GIT_BRANCH "${CMAKE_MATCH_1}")
message(STATUS "Git branch detected from .git directory: ${GIT_BRANCH}")
elseif(DEFINED ENV{TRAVIS_BRANCH})
set(GIT_BRANCH "$ENV{TRAVIS_BRANCH}")
message(STATUS "Git branch detected from TRAVIS_BRANCH environment variable: ${GIT_BRANCH}")
elseif(DEFINED ENV{GITHUB_REF})
set(GIT_BRANCH "$ENV{GITHUB_REF}")
message(STATUS "Git branch detected from GITHUB_BRANCH environment variable: ${GIT_BRANCH}")
else()
message("Git branch unknown: uploading coverage might nog work")
endif()
Expand Down

0 comments on commit cfc1f20

Please sign in to comment.