Move code format check to GitHub Actions
This commit is contained in:
parent
9f73564284
commit
3efa2099d9
|
@ -0,0 +1,16 @@
|
|||
name: CI
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
OPENLOCO_BUILD_SERVER: GitHub
|
||||
OPENLOCO_VERSION: 19.03
|
||||
jobs:
|
||||
check-code-formatting:
|
||||
name: Check code formatting
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: openrct2/openrct2-build:0.2.4-format
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Run clang-format
|
||||
run: scripts/run-clang-format.py -r src
|
31
.travis.yml
31
.travis.yml
|
@ -4,9 +4,9 @@ before_install:
|
|||
- docker pull openloco/openloco:$DOCKERIMG
|
||||
|
||||
install:
|
||||
- if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*; fi
|
||||
- if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git config remote.origin.fetch +refs/tags/*:refs/tags/*; fi
|
||||
- if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git fetch --tags; fi
|
||||
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
|
||||
- git config remote.origin.fetch +refs/tags/*:refs/tags/*
|
||||
- git fetch --tags
|
||||
|
||||
sudo: required
|
||||
dist: trusty
|
||||
|
@ -34,19 +34,6 @@ matrix:
|
|||
env:
|
||||
- OPENLOCO_CMAKE_OPTS="-G Ninja -DCMAKE_TOOLCHAIN_FILE=../CMakeLists_mingw.txt -DCMAKE_BUILD_TYPE=release -DBOOST_ROOT=/usr/i686-w64-mingw32/sys-root/mingw/ -DSDL2_DIR=/usr/i686-w64-mingw32/sys-root/mingw/lib/cmake/SDL2/ -DSDL2_MIXER_PATH=/usr/i686-w64-mingw32/sys-root/mingw/ -Dyaml-cpp_DIR=/usr/i686-w64-mingw32/sys-root/mingw/CMake/"
|
||||
- DOCKERIMG=fedora-mingw32
|
||||
- os: linux
|
||||
name: clang-format
|
||||
before_install: []
|
||||
language: cpp
|
||||
sudo: false
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- llvm-toolchain-trusty-5.0
|
||||
packages:
|
||||
- clang-format-5.0
|
||||
script:
|
||||
- ./scripts/run-clang-format.py -r src
|
||||
- os: osx
|
||||
name: macOS 10.13 Clang (Xcode 9.3)
|
||||
osx_image: xcode9.3 # macOS 10.13
|
||||
|
@ -55,9 +42,9 @@ matrix:
|
|||
- export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
install:
|
||||
- brew uninstall --ignore-dependencies boost
|
||||
- if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*; fi
|
||||
- if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git config remote.origin.fetch +refs/tags/*:refs/tags/*; fi
|
||||
- if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git fetch --tags; fi
|
||||
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
|
||||
- git config remote.origin.fetch +refs/tags/*:refs/tags/*
|
||||
- git fetch --tags
|
||||
script:
|
||||
- curl -L https://github.com/OpenLoco/Dependencies/releases/download/v1.2.0/openloco.dependencies.macos.1.2.0.zip -o dependencies.zip
|
||||
- unzip -q dependencies.zip -d vcpkg/
|
||||
|
@ -76,9 +63,9 @@ matrix:
|
|||
- export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
install:
|
||||
- brew uninstall --ignore-dependencies boost
|
||||
- if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*; fi
|
||||
- if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git config remote.origin.fetch +refs/tags/*:refs/tags/*; fi
|
||||
- if [[ $TRAVIS_JOB_NAME != "clang-format" ]]; then git fetch --tags; fi
|
||||
- git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
|
||||
- git config remote.origin.fetch +refs/tags/*:refs/tags/*
|
||||
- git fetch --tags
|
||||
script:
|
||||
- curl -L https://github.com/OpenLoco/Dependencies/releases/download/v1.2.0/openloco.dependencies.macos.1.2.0.zip -o dependencies.zip
|
||||
- unzip -q dependencies.zip -d vcpkg/
|
||||
|
|
Loading…
Reference in New Issue