Skip to content

Commit 05a81d5

Browse files
authored
Merge pull request #16 from qingfengxia/dev
fix issue 12 13 and doc tweaks
2 parents dba5f37 + cddc222 commit 05a81d5

24 files changed

Lines changed: 677 additions & 531 deletions

.github/pull_request_template.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--
2+
Thank you very much for putting in this PR!
3+
4+
PR is usually related with issue (github issue) or feature (slack, issue), please refer the link to issue and feature discussion.
5+
. If this PR is about tiny fix like spelling, document enhancement, please describe the fix in more details here.
6+
7+
PR needs to reviewed before merged, please let the right people know.
8+
Currently available team members to review and merge PR are:
9+
- Qingfeng Xia
10+
- Andrew Davis
11+
- John Nonweiler
12+
13+
-->
14+
15+
Checklist
16+
- [ ] Source is rebased on latest `upstream main` so is mergeable automatically or easily merged even with confliction.
17+
- [ ] Title of this PR is meaningful: e.g. "fix issue #8 geomPipeline.py -o does not work", not "fix geomPipeline.py"
18+
- [ ] Commit message is meaningful: `git push origin +your_branch` to squash some tiny fixes for CI failures
19+
- [ ] Give the maintainer the legal rights to change the open source license in the future (see wiki/Contribution.md) for details
20+
21+

.github/workflows/conda-ci.yml

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

.github/workflows/docker-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ jobs:
7777
make 2>&1 | tee clang_tidy_build_results.log
7878
make package
7979
ls *.${{ matrix.package_suffix }}
80+
if hash dpkg 2>/dev/null; then dpkg -i *.${{ matrix.package_suffix }}; fi
81+
if hash rpm 2>/dev/null; then rpm -Uhv *.${{ matrix.package_suffix }}; fi
8082
# copy the package to $GITHUB_WORKSPACE, pointer to host path, is not possible, while upload from ${{ github.workspace }} is fine
8183
mv *.${{ matrix.package_suffix }} ${{ env.PROJECT_NAME }}-${{ env.PROJECT_VERSION }}_${{ matrix.os }}.${{ matrix.package_suffix }}
8284
85+
8386
################### testing ##########################
8487
- name: Run unit tests
8588
working-directory: ${{ github.workspace }}/build

.github/workflows/github-ci.yml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,18 @@ jobs:
2626
compiler: gcc
2727
compilerpp: g++
2828
package_suffix: 'deb'
29-
- os: 'macos-latest'
30-
compiler: gcc
31-
compilerpp: g++
32-
package_suffix: 'dmg'
29+
# - os: 'macos-latest'
30+
# compiler: gcc
31+
# compilerpp: g++
32+
# package_suffix: 'dmg'
3333
steps:
3434
- uses: actions/checkout@v2
3535

3636
- name: Install Dependencies ( Ubuntu 20.04)
3737
run: |
3838
sudo apt-get update
3939
#sudo apt-get upgrade
40-
sudo apt-get install -y g++ cmake clang cppcheck similarity-tester flawfinder
40+
sudo apt-get install -y g++ cmake clang cppcheck similarity-tester flawfinder p7zip-full openssl
4141
sudo apt-get install -y lcov htmldoc poppler-utils graphviz doxygen
4242
sudo apt-get install -y libtbb*-dev libocct-*-dev occt-misc python3-dev python3-pybind11 libboost-dev freecad
4343
sudo apt-get install -y libx11-dev libxmu-dev libxi-dev
@@ -54,6 +54,16 @@ jobs:
5454
sudo apt-get install -y libx11-dev libxmu-dev libxi-dev
5555
if: matrix.os == 'ubuntu-18.04'
5656

57+
- name: zip source code for release
58+
run: |
59+
cd ..
60+
ls
61+
7z a -r ${{ env.PROJECT_NAME }}.zip ${{ env.PROJECT_NAME }}
62+
mv ${{ env.PROJECT_NAME }}.zip ${{ github.workspace }}/
63+
cd ${{ github.workspace }}
64+
sha256sum ${{ env.PROJECT_NAME }}.zip | awk '{ print $1; }' > ${{ github.workspace }}/${{ env.PROJECT_NAME }}.zip.sha256.txt
65+
if: matrix.os == 'ubuntu-20.04'
66+
5767
- name: Compile on Linux (debug)
5868
# env:
5969
# CC: ${{ matrix.compiler }}
@@ -64,7 +74,6 @@ jobs:
6474
cd build
6575
cmake -DCODE_COVERAGE=ON -DPython_EXECUTABLE=$(which python3) -DPPP_VERSION_NAME=${{ env.PROJECT_VERSION }} .. -Wno-dev
6676
make 2>&1 | tee clang_tidy_build_results.log
67-
# packup source code into zip and show in release : https://github.com/ukaea/parallel-preprocessor/archive/dev.zip
6877
if: matrix.os == 'ubuntu-20.04'
6978

7079
- name: Compile on Linux (release)
@@ -141,6 +150,32 @@ jobs:
141150
overwrite: true
142151
prerelease: true
143152
if: github.ref == 'refs/heads/main' # only upload package on main branch, not PR, forks, which has no write access
153+
154+
################### zip and upload source code zip ##########################
155+
# those release asset filename endpoint (not necessarily created before this upload)
156+
- name: Upload source code to release
157+
uses: svenstaro/upload-release-action@v2
158+
with:
159+
repo_token: ${{ secrets.GITHUB_TOKEN }}
160+
file: ${{ github.workspace }}/${{ env.PROJECT_NAME }}.zip
161+
asset_name: ${{ env.PROJECT_NAME }}.zip
162+
tag: dev
163+
overwrite: true
164+
prerelease: true
165+
if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-20.04'
166+
167+
- name: Upload source code checksum
168+
uses: svenstaro/upload-release-action@v2
169+
with:
170+
repo_token: ${{ secrets.GITHUB_TOKEN }}
171+
file: ${{ github.workspace }}/${{ env.PROJECT_NAME }}.zip.sha256.txt
172+
asset_name: ${{ env.PROJECT_NAME }}.zip.sha256.txt
173+
tag: dev
174+
overwrite: true
175+
prerelease: true
176+
if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-20.04'
177+
# only upload package on main branch, not PR, forks, which has no write access
178+
# https://github.com/ukaea/parallel-preprocessor/releases/download/dev/parallel-preprocessor.zip
144179

145180
########################################## only for Ubuntu debug release ############################################
146181
- name: Run Cpp Check Flawfinder Sim C++ ( Ubuntu GCC Dev/Master )
@@ -191,6 +226,7 @@ jobs:
191226
if: matrix.os == 'ubuntu-20.04' && ( github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' )
192227

193228
- name: Build Website Files ( Ubuntu GCC Dev/Master )
229+
working-directory: ${{ github.workspace }}
194230
run: |
195231
python scripts/site_generation.py build/clang_tidy_build_results.log build/flawfinder.log build/sim_cpp.log
196232
git add -f site/*.html
@@ -203,4 +239,4 @@ jobs:
203239
github_token: ${{ secrets.GITHUB_TOKEN }}
204240
branch: gh-pages
205241
force: true
206-
if: matrix.os == 'ubuntu-20.04' && ( github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' )
242+
if: matrix.os == 'ubuntu-20.04' && ( github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' )

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
#this file should not go publically
21

32
.vscode/*
43
build/*
4+
build-bionic/*
55
build-focal/*
66
vcbuild/*
77
condabuild/*
88

9+
910
third-party/*
1011
bin/*
1112
lib/*
@@ -19,6 +20,7 @@ incomplete_code/*
1920

2021
*/__pycache__/*
2122
*.so
23+
*.pyc
2224

2325

2426
Web/*

0 commit comments

Comments
 (0)