-
Notifications
You must be signed in to change notification settings - Fork 0
148 lines (136 loc) · 4.6 KB
/
programming_team_code_ci.yml
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
name: programming team code CI
on: [push, workflow_dispatch]
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: pip3 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 tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: oj-verify all --tle 35 --timeout 21600
check_format_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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-18 cppcheck
- name: checks format then lints
run: make --directory=tests/ check_format_lint
clangtidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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-18
- name: clang-tidy
run: make --directory=tests/ clangtidy
compile_gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Compile all tests
run: make --directory=tests/ compile_gcc
compile_clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: wget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s -- 18
- name: Compile all tests
run: make --directory=tests/ compile_clang
files_without_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: files without tests
run: make --directory=tests/ files_without_tests
build_ptc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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 -- 18
- name: build ptc
run: make --directory=tests/ ptc
- uses: actions/upload-artifact@v3
with:
name: ptc
path: tests/ptc.pdf
publish_ptc:
runs-on: ubuntu-latest
needs: [library_checker_aizu, check_format_lint, clangtidy, compile_gcc, compile_clang, files_without_tests, build_ptc]
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
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, check_format_lint, clangtidy, compile_gcc, compile_clang, files_without_tests]
if: github.ref == 'refs/heads/dev' && github.event_name == 'push'
steps:
- uses: actions/checkout@v2
- 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-18
- name: Combine includes and force push to main branch
run: |
git config --local user.name github-actions
git config --local user.email [email protected]
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@v2
- name: Install dependencies
run: sudo apt install shfmt shellcheck
- name: shellcheck and shfmt
run: make --directory=tests/ shellcheck_shfmt