Skip to content

Commit

Permalink
Merge pull request #24 from liufang-robot/master
Browse files Browse the repository at this point in the history
workflow修改,CMAKE添加线程测试的option
  • Loading branch information
liufang-robot authored Jan 14, 2023
2 parents 58a4825 + 027ec19 commit 95928b1
Show file tree
Hide file tree
Showing 29 changed files with 538 additions and 239 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Building and checking
run-name: ${{ github.actor }} Building
name: build
run-name: ${{ github.actor }} build
on:
workflow_dispatch:
push:
pull_request:
# push:
# pull_request:

jobs:
build:
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
run: pip3 install -r requirements.txt

- name: configure
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON -DBUILD_DEB=ON
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON -DBUILD_DEB=ON -DBUILD_DOCUMENTATION=ON

- name: build
run: cmake --build build
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/linux_cpp_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Linux cpp build
run-name: ${{ github.actor }} Linux cpp build
on:
workflow_dispatch:
pull_request:
jobs:
linux_cpp_build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: install components
run: sudo apt-get install -y build-essential doxygen graphviz python3-pip python3-dev

- name: install dependencies
run: pip3 install -r requirements.txt

- name: configure
run: cmake -S. -Bbuild -DBUILD_DEB=ON

- name: build
run: cmake --build build

linux_cpp_test:
needs: linux_cpp_build
runs-on: ubuntu-latest
container: registry.cn-shanghai.aliyuncs.com/lebai/l-master:latest
steps:
- name: start nginx
run: nginx

- name: start daemon
run: |
systemctl start l-master-rc
systemctl start l-master-ds
- name: Checkout
uses: actions/checkout@v3

- name: install components
run: apt-get install -y build-essential doxygen graphviz python3-pip python3-dev

- name: install dependencies
run: pip3 install -r requirements.txt

- name: configure
run: cmake -S. -Bbuild -DBUILD_TESTING=ON -DBUILD_DOCUMENTATION=ON

- name: build
run: cmake --build build

- name: test
run: cmake --build build --target test
2 changes: 1 addition & 1 deletion .github/workflows/linux_cpp_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
run: pip3 install -r requirements.txt

- name: configure
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON -DBUILD_DEB=ON
run: cmake -S. -Bbuild -DBUILD_DEB=ON -DBUILD_DOCUMENTATION=ON

- name: build
run: cmake --build build
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/linux_dotnet_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Linux dotnet build
run-name: ${{ github.actor }} Linux dotnet build
on:
workflow_dispatch:
pull_request:
jobs:
linux_dotnet_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup .NET Core 3.1
uses: actions/[email protected]

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Check dotnet
run: dotnet --info

- name: configure
run: cmake -S. -Bbuild -DBUILD_DOTNET=ON

- name: build
run: cmake --build build
35 changes: 35 additions & 0 deletions .github/workflows/linux_dotnet_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Linux dotnet release
run-name: ${{ github.actor }} Linux dotnet release
on:
workflow_dispatch:
push:
tags:
- v1.*.*
jobs:
linux_dotnet_build_and_release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup .NET Core 3.1
uses: actions/[email protected]

- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Check dotnet
run: dotnet --info

- name: configure
run: cmake -S. -Bbuild -DBUILD_DOTNET=ON

- name: build
run: cmake --build build

- name: upload pacakges
run:
cd ./build/dotnet/packages
dotnet nuget push lebai.1.0.*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
22 changes: 22 additions & 0 deletions .github/workflows/linux_java_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Linux java build
run-name: ${{ github.actor }} Linux java build
on:
workflow_dispatch:
pull_request:
jobs:
linux_java_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- uses: actions/setup-java@v1
with:
java-version: '11'

- name: configure
run: cmake -S. -Bbuild -DBUILD_JAVA=ON

- name: build
run: cmake --build build

40 changes: 40 additions & 0 deletions .github/workflows/linux_python_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Linux python build
run-name: ${{ github.actor }} Linux python build
on:
workflow_dispatch:
pull_request:
jobs:
linux_python_build:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2010_x86_64
steps:
- name: Checkout
uses: actions/checkout@v1

- run: for PYBIN in /opt/python/*/bin;do "${PYBIN}/pip" install -r requirements.txt; done;
- run: /opt/python/cp310-cp310/bin/pip install twine==2.0.0

- name: configure
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON

- name: build
run: cmake --build build

- name: create-whl-dir
run: mkdir -p whl

- name: build with python
run: for PY in /opt/python/*;do
rm -rf build;
cmake -S. -Bbuild -DBUILD_PYTHON=ON;
cmake --build build;
cp build/python/dist/*.whl whl/;
done;

- name: repair
run: for PYWHL in whl/*.whl;do
auditwheel repair ${PYWHL};
done;

- name: list Pypi
run: ls wheelhouse/*
52 changes: 24 additions & 28 deletions .github/workflows/linux_python_release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Linux python release
run-name: ${{ github.actor }} released page
run-name: ${{ github.actor }} Linux python release
on:
workflow_dispatch:
push:
Expand All @@ -14,36 +14,32 @@ permissions:

jobs:
linux_python_build_and_release:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2010_x86_64
steps:
- name: Checkout
uses: actions/checkout@v1

- run: for PYBIN in /opt/python/*/bin;do "${PYBIN}/pip" install -r requirements.txt; done;
- run: /opt/python/cp310-cp310/bin/pip install twine==2.0.0

- name: configure
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON

- name: build
run: cmake --build build

- name: create-whl-dir
run: mkdir -p whl

- name: build with python
run: for PY in /opt/python/*;do
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2010_x86_64
steps:
- name: Checkout
uses: actions/checkout@v1

- run: for PYBIN in /opt/python/*/bin;do "${PYBIN}/pip" install -r requirements.txt; done;
- run: /opt/python/cp310-cp310/bin/pip install twine==2.0.
- name: configure
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON
- name: build
run: cmake --build build
- name: create-whl-dir
run: mkdir -p wh
- name: build with python
run: for PY in /opt/python/*;do
rm -rf build;
cmake -S. -Bbuild -DBUILD_PYTHON=ON -DPYTHONPATH=${PY};
cmake -S. -Bbuild -DBUILD_PYTHON=ON;
cmake --build build;
cp build/python/dist/*.whl whl/;
done;
- name: repair
run: for PYWHL in whl/*.whl;do

- name: repair
run: for PYWHL in whl/*.whl;do
auditwheel repair ${PYWHL};
done;
- name: upload Pypi
run: /opt/python/cp310-cp310/bin/twine upload -u ${{ secrets.USRNAME }} -p ${{ secrets.PASSWD }} wheelhouse/*.whl

- name: upload Pypi
run: /opt/python/cp310-cp310/bin/twine upload -u ${{ secrets.USRNAME }} -p ${{ secrets.PASSWD }} wheelhouse/*.whl
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: release
run-name: ${{ github.actor }} released page
run-name: ${{ github.actor }} release
on:
workflow_dispatch:
push:
tags:
- v1.*.*
# push:
# tags:
# - v1.*.*
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
run: pip3 install -r requirements.txt

- name: configure
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON -DBUILD_DEB=ON
run: cmake -S. -Bbuild -DBUILD_PYTHON=ON -DBUILD_DEB=ON -DBUILD_DOCUMENTATION=ON

- name: build
run: cmake --build build
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/windows_cpp_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Windows cpp build
run-name: ${{ github.actor }} Windows cpp build
on:
workflow_dispatch:
pull_request:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
pull-requests: read

jobs:
windows_cpp_build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check cmake
run: cmake --version
- name: Configure
run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -DBUILD_DOCUMENTATION=OFF
- name: Build
run: cmake --build build
27 changes: 27 additions & 0 deletions .github/workflows/windows_python_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Windows python build
run-name: ${{ github.actor }} Windows python build
on:
workflow_dispatch:
# pull_request:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
pull-requests: read

jobs:
windows_python_build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Check cmake
run: cmake --version
- name: Configure
run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -DBUILD_PYTHON=ON -DBUILD_DOCUMENTATION=OFF
- name: Build
run: cmake --build build
Loading

0 comments on commit 95928b1

Please sign in to comment.