Skip to content

Commit f2c94dc

Browse files
metopaadnanaziztsunghsienlee
committed
Merge Beta 5 release
Co-authored-by: Adnan Aziz <[email protected]> Co-authored-by: Tsung-Hsien Lee <[email protected]>
2 parents b8204e3 + 71fa39d commit f2c94dc

File tree

1,359 files changed

+220224
-155408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,359 files changed

+220224
-155408
lines changed
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
name: Test C++ programs
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'epi_judge_java*/**'
7+
- 'epi_judge_python*/**'
8+
- 'html/**'
9+
- '.gitignore'
10+
- 'index.html'
11+
- '*.md'
12+
- 'LICENSE'
13+
pull_request:
14+
paths-ignore:
15+
- 'epi_judge_java*/**'
16+
- 'epi_judge_python*/**'
17+
- 'html/**'
18+
- '.gitignore'
19+
- 'index.html'
20+
- '*.md'
21+
- 'LICENSE'
22+
23+
env:
24+
BUILD_TYPE: Debug
25+
26+
jobs:
27+
fast_test:
28+
name: Fast Test
29+
runs-on: ubuntu-latest
30+
# Skip on PR if branch is of the same repo (checks are already enabled by push rule)
31+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
32+
33+
strategy:
34+
matrix:
35+
mode: [stub, solution]
36+
include:
37+
- mode: stub
38+
folder: epi_judge_cpp
39+
- mode: solution
40+
folder: epi_judge_cpp_solutions
41+
42+
steps:
43+
- uses: actions/checkout@v1
44+
45+
- name: Set up Python 3.7
46+
uses: actions/setup-python@v1
47+
with:
48+
python-version: 3.7
49+
50+
- name: Install dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install click
54+
55+
- name: Create Build Environment
56+
# Some projects don't allow in-source building, so create a separate build directory
57+
# We'll use this as our working directory for all subsequent commands
58+
run: cmake -E make_directory ${{runner.workspace}}/build
59+
60+
- name: Configure CMake
61+
# Use a bash shell so we can use the same syntax for environment variable
62+
# access regardless of the host operating system
63+
shell: bash
64+
working-directory: ${{runner.workspace}}/build
65+
# Note the current convention is to use the -S and -B options here to specify source
66+
# and build directories, but this is only available with CMake 3.13 and higher.
67+
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
68+
run: cmake $GITHUB_WORKSPACE/${{matrix.folder}} -DCMAKE_BUILD_TYPE=$BUILD_TYPE
69+
70+
- name: Build
71+
working-directory: ${{runner.workspace}}/build
72+
shell: bash
73+
run: cmake --build . --config $BUILD_TYPE -- -j 8
74+
75+
- name: Test
76+
shell: bash
77+
run: python epijudge_ci_test_tool.py --build-dir "${{runner.workspace}}/build" cpp ${{matrix.mode}} .
78+
79+
windows_test:
80+
name: Windows Test
81+
needs: fast_test
82+
runs-on: windows-latest
83+
if: github.event_name == 'push' && github.event.ref == 'refs/tags/full-ci' && github.event.deleted == false
84+
85+
strategy:
86+
matrix:
87+
mode: [stub, solution]
88+
include:
89+
- mode: stub
90+
folder: epi_judge_cpp
91+
- mode: solution
92+
folder: epi_judge_cpp_solutions
93+
94+
steps:
95+
- uses: actions/checkout@v1
96+
97+
- name: Set up Python 3.7
98+
uses: actions/setup-python@v1
99+
with:
100+
python-version: 3.7
101+
102+
- name: Install dependencies
103+
run: |
104+
python -m pip install --upgrade pip
105+
pip install click
106+
107+
- name: Create Build Environment
108+
run: cmake -E make_directory "${{runner.workspace}}/build"
109+
110+
- name: Configure CMake
111+
shell: bash
112+
working-directory: ${{runner.workspace}}/build
113+
run: cmake "$GITHUB_WORKSPACE/${{matrix.folder}}" -DCMAKE_BUILD_TYPE=$BUILD_TYPE
114+
115+
- name: Build
116+
working-directory: ${{runner.workspace}}/build
117+
shell: bash
118+
run: cmake --build . --config $BUILD_TYPE
119+
120+
- name: Test
121+
shell: bash
122+
run: python epijudge_ci_test_tool.py --build-dir "${{runner.workspace}}/build/$BUILD_TYPE" cpp ${{matrix.mode}} .
123+
124+
macos_test:
125+
name: macOS Test
126+
needs: windows_test
127+
runs-on: macOS-latest
128+
if: github.event_name == 'push' && github.event.ref == 'refs/tags/full-ci' && github.event.deleted == false
129+
130+
strategy:
131+
matrix:
132+
mode: [stub, solution]
133+
include:
134+
- mode: stub
135+
folder: epi_judge_cpp
136+
- mode: solution
137+
folder: epi_judge_cpp_solutions
138+
139+
steps:
140+
- uses: actions/checkout@v1
141+
142+
- name: Set up Python 3.7
143+
uses: actions/setup-python@v1
144+
with:
145+
python-version: 3.7
146+
147+
- name: Install dependencies
148+
run: |
149+
python -m pip install --upgrade pip
150+
pip install click
151+
152+
- name: Create Build Environment
153+
run: cmake -E make_directory "${{runner.workspace}}/build"
154+
155+
- name: Configure CMake
156+
shell: bash
157+
working-directory: ${{runner.workspace}}/build
158+
run: cmake "$GITHUB_WORKSPACE/${{matrix.folder}}" -DCMAKE_BUILD_TYPE=$BUILD_TYPE
159+
160+
- name: Build
161+
working-directory: ${{runner.workspace}}/build
162+
shell: bash
163+
run: cmake --build . --config $BUILD_TYPE -- -j 8
164+
165+
# Mac build should be identical to ubuntu, skip testing to save resources
166+
167+
dummy_job:
168+
name: Empty check
169+
runs-on: ubuntu-latest
170+
# Add a dummy job to avoid empty job list (otherwise GitHub shows the runs as failed)
171+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
172+
steps:
173+
- name: This check is triggered by the corresponding push event
174+
run: echo 'This check is triggered by the corresponding push event'
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Run Java programs
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'epi_judge_cpp*/**'
7+
- 'epi_judge_python*/**'
8+
- 'html/**'
9+
- '.gitignore'
10+
- 'index.html'
11+
- '*.md'
12+
- 'LICENSE'
13+
pull_request:
14+
paths-ignore:
15+
- 'epi_judge_cpp*/**'
16+
- 'epi_judge_python*/**'
17+
- 'html/**'
18+
- '.gitignore'
19+
- 'index.html'
20+
- '*.md'
21+
- 'LICENSE'
22+
23+
jobs:
24+
fast_test:
25+
name: Fast Test
26+
runs-on: ubuntu-latest
27+
# Skip on PR if branch is of the same repo (checks are already enabled by push rule)
28+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
29+
30+
strategy:
31+
matrix:
32+
mode: [stub, solution]
33+
include:
34+
- mode: stub
35+
folder: epi_judge_java
36+
- mode: solution
37+
folder: epi_judge_java_solutions
38+
39+
steps:
40+
- uses: actions/checkout@v1
41+
- name: Set up Python 3.7
42+
uses: actions/setup-python@v1
43+
with:
44+
python-version: 3.7
45+
- name: Set up Java 11
46+
uses: actions/setup-java@v1
47+
with:
48+
java-version: '11.0.4'
49+
java-package: jdk
50+
- name: Install dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install click
54+
- name: Compile
55+
run: make -C ${{ matrix.folder }} all
56+
- name: Test
57+
run: python epijudge_ci_test_tool.py java ${{ matrix.mode }} .
58+
59+
full_test:
60+
name: Full Test
61+
needs: fast_test
62+
runs-on: windows-latest
63+
if: github.event_name == 'push' && github.event.ref == 'refs/tags/full-ci' && github.event.deleted == false
64+
65+
strategy:
66+
matrix:
67+
mode: [stub, solution]
68+
include:
69+
- mode: stub
70+
folder: epi_judge_java
71+
- mode: solution
72+
folder: epi_judge_java_solutions
73+
74+
steps:
75+
- uses: actions/checkout@v1
76+
- name: Set up Python 3.7
77+
uses: actions/setup-python@v1
78+
with:
79+
python-version: 3.7
80+
- name: Set up Java 11
81+
uses: actions/setup-java@v1
82+
with:
83+
java-version: '11.0.4'
84+
java-package: jdk
85+
- name: Install dependencies
86+
run: |
87+
python -m pip install --upgrade pip
88+
pip install click
89+
- name: Compile
90+
run: make -C ${{ matrix.folder }} all
91+
- name: Test
92+
run: python epijudge_ci_test_tool.py java ${{ matrix.mode }} .
93+
94+
dummy_job:
95+
name: Empty check
96+
runs-on: ubuntu-latest
97+
# Add a dummy job to avoid empty job list (otherwise GitHub shows the runs as failed)
98+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
99+
steps:
100+
- name: This check is triggered by the corresponding push event
101+
run: echo 'This check is triggered by the corresponding push event'

.github/workflows/test_python.yml

Lines changed: 66 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,63 @@
1-
name: Test EPIJudge python programs
1+
name: Run Python programs
22

3-
on:
4-
- push
5-
- pull_request
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'epi_judge_cpp*/**'
7+
- 'epi_judge_java*/**'
8+
- 'html/**'
9+
- '.gitignore'
10+
- 'index.html'
11+
- '*.md'
12+
- 'LICENSE'
13+
pull_request:
14+
paths-ignore:
15+
- 'epi_judge_cpp*/**'
16+
- 'epi_judge_java*/**'
17+
- 'html/**'
18+
- '.gitignore'
19+
- 'index.html'
20+
- '*.md'
21+
- 'LICENSE'
622

723
jobs:
8-
build:
9-
24+
fast_test:
25+
name: Fast Test
1026
runs-on: ubuntu-latest
27+
# Skip on PR if branch is of the same repo (checks are already enabled by push rule)
28+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
29+
30+
steps:
31+
- uses: actions/checkout@v1
32+
- name: Set up Python 3.6
33+
uses: actions/setup-python@v1
34+
with:
35+
python-version: 3.6
36+
- name: Install dependencies
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install bintrees click
40+
- name: Test stubs
41+
run: |
42+
python epijudge_ci_test_tool.py python stub .
43+
- name: Test solutions
44+
run: |
45+
python epijudge_ci_test_tool.py python solution .
46+
47+
full_test:
48+
name: Full Test
49+
needs: fast_test
50+
runs-on: ${{ matrix.os }}
51+
if: github.event_name == 'push' && github.event.ref == 'refs/tags/full-ci' && github.event.deleted == false
52+
1153
strategy:
12-
max-parallel: 4
54+
max-parallel: 2
1355
matrix:
14-
python-version: [3.6, 3.7]
56+
os: [ubuntu-latest, windows-latest]
57+
python-version: [3.6, 3.7, 3.8]
58+
exclude:
59+
- os: ubuntu-latest
60+
python-version: 3.6
1561

1662
steps:
1763
- uses: actions/checkout@v1
@@ -25,7 +71,17 @@ jobs:
2571
pip install bintrees click
2672
- name: Test stubs
2773
run: |
28-
python epijudge_ci_test_tool.py python stub
74+
python epijudge_ci_test_tool.py python stub .
2975
- name: Test solutions
3076
run: |
31-
python epijudge_ci_test_tool.py python solution
77+
python epijudge_ci_test_tool.py python solution .
78+
79+
dummy_job:
80+
name: Empty check
81+
runs-on: ubuntu-latest
82+
# Add a dummy job to avoid empty job list (otherwise GitHub shows the runs as failed)
83+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
84+
steps:
85+
- name: This check is triggered by the corresponding push event
86+
run: echo 'This check is triggered by the corresponding push event'
87+

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,10 @@ __pycache__/
2020

2121
# Generated by make
2222
cpp_build
23+
build
2324

2425
epi_judge_java/java_build/
26+
*.class
27+
28+
# OS X specific files
29+
.DS_Store

0 commit comments

Comments
 (0)