Skip to content

Commit

Permalink
drop script
Browse files Browse the repository at this point in the history
  • Loading branch information
Lihis committed Jan 8, 2025
1 parent efbc1b4 commit 07d140d
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 21 deletions.
48 changes: 38 additions & 10 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,51 @@ 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
XDG_RUNTIME_DIR: /tmp

jobs:
build-and-test:
# fedora-build-and-test:
# runs-on: ubuntu-latest
# container:
# image: quay.io/fedora/fedora:latest
# steps:
# - name: Install dependencies
# run: |
# dnf install -y git-core 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: Checkout
# uses: actions/checkout@v4
# with:
# submodules: recursive
# - name: Build and test
# run: mkdir build && cd build && ctest -VV -S ../cmake/ctest/script_ci.ctest
ubuntu-build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
distro: [ "ubuntu", "fedora", "archlinux" ]
steps:
- name: Install dependencies
run: |
sudo apt-get update && \
sudo apt-get install --no-install-recommends --no-upgrade -y \
git-core build-essential cmake ninja-build clang llvm lcov curl \
libavcodec-dev libavformat-dev libboost-program-options-dev \
libboost-system-dev libbullet-dev libglm-dev libopenal-dev \
libsdl2-dev libboost-test-dev libqt5opengl5-dev libfreetype6-dev \
iwyu qtbase5-dev qt5-qmake
env:
DEBIAN_FRONTEND: noninteractive
- 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"
with:
submodules: recursive
- name: Build and test
run: mkdir build && cd build && ctest -VV -S ../cmake/ctest/script_ci.ctest
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 07d140d

Please sign in to comment.