Skip to content

Commit d6ed398

Browse files
Alexander KurbatovAlexander Kurbatov
Alexander Kurbatov
authored and
Alexander Kurbatov
committed
refactor: Unify CI tasks
Use one task but different concurrent jobs. Signed-off-by: Alexander Kurbatov <Alexander.Kurbatov@acronis.com>
1 parent 13305b3 commit d6ed398

File tree

3 files changed

+46
-79
lines changed

3 files changed

+46
-79
lines changed

.github/workflows/ci.yml

+46-8
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,57 @@ env:
1919
BUILD_DIR: ${{github.workspace}}/build
2020

2121
jobs:
22-
build:
22+
lint:
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
28+
- name: Setup
29+
run: curl -o cpplint.py https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py
30+
31+
- name: Lint
32+
run: |
33+
python2 cpplint.py \
34+
--linelength=90 \
35+
--filter=-build/header_guard,-build/include,-build/c++11 \
36+
src/* \
37+
src/blueprints/* \
38+
src/core/* \
39+
src/objects/* \
40+
src/plugins/* \
41+
src/strategies/* \
42+
src/strategies/protoss/* \
43+
src/strategies/terran/* \
44+
src/strategies/zerg/*
45+
46+
crossplatform_build:
2347
runs-on: ${{ matrix.os }}
2448
strategy:
2549
matrix:
2650
os: [windows-latest, macos-latest, ubuntu-latest]
2751

2852
steps:
29-
- uses: actions/checkout@v2
30-
with:
31-
submodules: recursive
53+
- uses: actions/checkout@v2
54+
with:
55+
submodules: recursive
56+
57+
- name: Configure
58+
run: cmake -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
59+
60+
- name: Build
61+
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} --parallel 2
62+
63+
ladder_build:
64+
runs-on: ubuntu-18.04
65+
66+
steps:
67+
- uses: actions/checkout@v2
68+
with:
69+
submodules: recursive
3270

33-
- name: Configure
34-
run: cmake -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
71+
- name: Configure
72+
run: cmake -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_FOR_LADDER=ON -DSC2_VERSION=4.10.0
3573

36-
- name: Build
37-
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} --parallel 2
74+
- name: Build
75+
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} --parallel 2

.github/workflows/ladder.yml

-35
This file was deleted.

.github/workflows/linter.yaml

-36
This file was deleted.

0 commit comments

Comments
 (0)