Skip to content

Commit 22b220b

Browse files
authored
Merge pull request #43 from Certseeds/dev
feat: 移除和模板无关的代码
2 parents b5a424f + 6e473ad commit 22b220b

File tree

2,117 files changed

+4954
-73589
lines changed

Some content is hidden

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

2,117 files changed

+4954
-73589
lines changed

.github/workflows/pull_request.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ jobs:
5151
gcc --version
5252
g++ --version
5353
54-
- name: prepare libopencv
54+
- name: prepare deps
5555
run: |
56-
sudo apt-get update && sudo apt-get install libopencv-dev
56+
bash ./third_party/install.sh
5757
5858
- name: Use cmake
5959
run: cmake --version
@@ -65,20 +65,8 @@ jobs:
6565
working-directory: ./CMAKE_DEBUG_PATH/lab_00
6666
run: cmake --build . --config DEBUG --parallel
6767

68-
- name: cmake compile algorithm/2021F
69-
working-directory: ./CMAKE_DEBUG_PATH/algorithm/2021F
70-
run: cmake --build . --config DEBUG --parallel
71-
72-
- name: cmake compile algorithm/matrix
73-
working-directory: ./CMAKE_DEBUG_PATH/algorithm/matrix
74-
run: cmake --build . --config DEBUG --parallel
75-
76-
- name: cmake compile algorithm
77-
working-directory: ./CMAKE_DEBUG_PATH/algorithm/
78-
run: cmake --build .
79-
80-
- name: cmake compile basic
81-
working-directory: ./CMAKE_DEBUG_PATH/basic
68+
- name: cmake compile 2021F
69+
working-directory: ./CMAKE_DEBUG_PATH/2021F
8270
run: cmake --build . --config DEBUG --parallel
8371

8472
- name: cmake compile

.github/workflows/release.yml

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
gcc --version
3838
g++ --version
3939
40-
- name: prepare libopencv ccache
40+
- name: prepare deps
4141
run: |
42-
sudo apt-get install libopencv-dev ccache
42+
bash ./third_party/install.sh
4343
4444
- name: Use cmake
4545
run: cmake --version
@@ -51,20 +51,8 @@ jobs:
5151
working-directory: ./CMAKE_DEBUG_PATH/lab_00
5252
run: cmake --build . --config DEBUG --parallel
5353

54-
- name: cmake compile algorithm/2021F
55-
working-directory: ./CMAKE_DEBUG_PATH/algorithm/2021F
56-
run: cmake --build . --config DEBUG --parallel
57-
58-
- name: cmake compile algorithm/matrix
59-
working-directory: ./CMAKE_DEBUG_PATH/algorithm/matrix
60-
run: cmake --build . --config DEBUG --parallel
61-
62-
- name: cmake compile algorithm
63-
working-directory: ./CMAKE_DEBUG_PATH/algorithm/
64-
run: cmake --build .
65-
66-
- name: cmake compile basic
67-
working-directory: ./CMAKE_DEBUG_PATH/basic
54+
- name: cmake compile 2021F
55+
working-directory: ./CMAKE_DEBUG_PATH/2021F
6856
run: cmake --build . --config DEBUG --parallel
6957

7058
- name: cmake compile
@@ -106,17 +94,14 @@ jobs:
10694
SOURCE_BRANCH: ${{ steps.branch_name.outputs.SOURCE_BRANCH }}
10795
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
10896

109-
- name: prepare libopencv
110-
run: |
111-
sudo apt-get update && sudo apt-get install libopencv-dev
11297
# ensure the path and files of project
11398
- name: ensure the path and files of project
11499
run: sudo apt-get install tree; tree; mkdir -p ./cmake_build_release
115100

116-
- name: cmake install dependencies
101+
- name: prepare deps
117102
run: |
118-
cmake -S . -B ./cmake_build_release -DCMAKE_BUILD_TYPE=Debug
119-
rm -rf ./cmake_build_release
103+
bash ./third_party/install.sh
104+
bash ./third_party/rename.sh
120105
121106
- name: move cmake-fetchcontent to folder
122107
working-directory: ./third_party
@@ -171,30 +156,26 @@ jobs:
171156
env:
172157
SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }}
173158

174-
- name: git operations
175-
run: |
176-
git config --global user.name 'Certseeds'
177-
git config --global user.email '51754303+Certseeds@users.noreply.github.com'
178-
git checkout -b release
179-
mkdir cmake_build_release
180159

181-
- name: prepare libopencv
160+
- name: prepare deps
182161
run: |
183-
sudo apt-get update && sudo apt-get install libopencv-dev
162+
bash ./third_party/install.sh
163+
bash ./third_party/rename.sh
184164
185-
- name: cmake install dependencies
165+
- name: git operations
186166
run: |
187-
cmake -S . -B ./cmake_build_release -DCMAKE_BUILD_TYPE=Debug
188-
rm -rf ./cmake_build_release
167+
git config --global user.name 'Certseeds'
168+
git config --global user.email '51754303+Certseeds@users.noreply.github.com'
169+
git checkout --orphan release
189170
190171
- name: move cmake-fetchcontent to folder
191172
working-directory: ./third_party
192173
run: |
193174
echo '**/.github/*' > ./.gitignore
194175
rm ./CMakeLists.txt
195176
mv ./CMakeLists.release.txt ./CMakeLists.txt
196-
git add .
197-
git commit -am "dependencies: add dependencies to release branch"
177+
git add -A
178+
git commit -am "init: with deps"
198179
199180
- name: run script
200181
working-directory: ./script

.github/workflows/rust_build.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

2021F/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required(VERSION 3.16.6)
2+
set(YEAR 2021)
3+
set(SEMESTER FALL)
4+
5+
set(CMAKE_CXX_STANDARD 11)
6+
project(CS203_DSAA_${YEAR}_${SEMESTER} LANGUAGES CXX)
7+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
8+
9+
enable_testing()
10+
file(GLOB USER_LIBS_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lab_*) # regex to find libs, more flexibility
11+
foreach (elementName IN LISTS USER_LIBS_PATH)
12+
add_subdirectory(${elementName})
13+
endforeach ()
14+
unset(USER_LIBS_PATH)
File renamed without changes.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
cmake_minimum_required(VERSION 3.16.6)
2+
set(PROBLEM_ORDER A)
3+
project(${PROJECT_NAME}_${PROBLEM_ORDER})
4+
5+
set(CMAKE_CXX_STANDARD 11)
6+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
7+
8+
enable_testing()
9+
add_executable(${PROJECT_NAME} main.cpp)
10+
set(CMAKE_CXX_STANDARD 17)
11+
add_executable(${PROJECT_NAME}_test test.cpp)
12+
target_compile_definitions(${PROJECT_NAME}_test PRIVATE ALGORITHM_TEST_MACRO)
13+
target_link_libraries(${PROJECT_NAME}_test PRIVATE algorithm_template_INCLUDE)
14+
MESSAGE(STATUS "${PROJECT_NAME}_${elementName} from ${CMAKE_CURRENT_SOURCE_DIR}/test.cpp")
15+
add_test(${PROJECT_NAME}_CTEST ${PROJECT_NAME}_test)
16+
set(CMAKE_CXX_STANDARD 11)

0 commit comments

Comments
 (0)