-
Notifications
You must be signed in to change notification settings - Fork 1
153 lines (141 loc) · 4.85 KB
/
programming_team_code_ci.yml
File metadata and controls
153 lines (141 loc) · 4.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: programming team code CI
on: push
permissions:
contents: write
jobs:
library_checker_aizu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
- name: Install dependencies
run: |
pip install "setuptools<81"
pip install -U online-judge-verify-helper
- name: Set up Rust (nightly)
run: |
rustup set profile minimal
rustup install nightly
rustup override set nightly
- name: Set up git submodules
run: |
git submodule init
git submodule update
rm -rf hackpack-cpp/tests/
- name: Run library checker and aizu tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: oj-verify all --tle 60 --timeout 21600
grep_clangformat_cppcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up LLVM repository
run: |
sudo apt update
sudo apt install -y wget software-properties-common
wget -O - https://apt.llvm.org/llvm.sh | sudo bash
- name: Install dependencies
run: sudo apt update && sudo apt install -y clang-format-19 cppcheck
- name: grep, clang-format, cppcheck
run: make --directory=tests/ grep_clangformat_cppcheck
clangtidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up LLVM repository
run: |
sudo apt update
sudo apt install -y wget software-properties-common
wget -O - https://apt.llvm.org/llvm.sh | sudo bash
- name: Install dependencies
run: sudo apt update && sudo apt install -y clang-tidy-19
- name: clang-tidy
run: make --directory=tests/ clangtidy
compile_gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: g++ with gcc
run: make --directory=tests/ compile_gcc
compile_clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up LLVM repository
run: wget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s -- 19
- name: Install dependencies
run: sudo apt update && sudo apt install -y clang-19
- name: g++ with clang
run: make --directory=tests/ compile_clang
find_files_without_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: find files without tests
run: make --directory=tests/ find_files_without_tests
build_pdf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install texlive, rename, nodejs, npm, clang
run: |
sudo apt update
sudo apt install texlive texlive-latex-extra rename nodejs npm
wget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s -- 19
sudo apt update && sudo apt install -y clang-19
- name: build pdf
run: make --directory=tests/ build_pdf
- uses: actions/upload-artifact@v4
with:
name: ptc
path: tests/ptc.pdf
publish_pdf:
runs-on: ubuntu-latest
needs: [library_checker_aizu, grep_clangformat_cppcheck, clangtidy, compile_gcc, compile_clang, find_files_without_tests, build_pdf]
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ptc
path: tests/ptc.pdf
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: ptc
prerelease: false
title: ptc
files: tests/ptc.pdf
update_main:
runs-on: ubuntu-latest
needs: [library_checker_aizu, grep_clangformat_cppcheck, clangtidy, compile_gcc, compile_clang, find_files_without_tests]
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: Set up LLVM repository
run: |
sudo apt update
sudo apt install -y wget software-properties-common
wget -O - https://apt.llvm.org/llvm.sh | sudo bash
- name: Install dependencies
run: sudo apt update && sudo apt install -y clang-format-19
- name: Combine includes and force push to main branch
run: |
git config --local user.name github-actions
git config --local user.email 160645609+programming-team-code@users.noreply.github.com
make --directory=tests/ update_main
git rm -rf library/ tests/ .verify-helper/ .gitmodules kactl/ hackpack-cpp/ notebook-generator/ .github/
git add --all
git commit --message "programming_team_code"
git checkout -b main
git push origin main --force
shellcheck_shfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt install shfmt shellcheck
- name: shellcheck, shfmt
run: make --directory=tests/ shellcheck_shfmt