Skip to content

Commit 72b3efb

Browse files
ci: test vcpkg publish
| Submodule prism b15e721..35e55c9: | > ci: test vcpkg publish 1.0.6 | Submodule prism_container 981de5a..075e3e8: | > ci: test vcpkg publish 1.0.6 | Submodule prism_qt_core 80da53a..5966e56: | > ci: test vcpkg publish 1.0.6 | Submodule prism_qt_modular 1b0b33d..5ce6790: | > ci: test vcpkg publish 1.0.6 | Submodule prism_qt_ui ea280c6..d9caeca: | > ci: test vcpkg publish 1.0.6
1 parent 7158c29 commit 72b3efb

9 files changed

Lines changed: 135 additions & 6 deletions

File tree

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-22.04
10+
env:
11+
VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite"
12+
NUGET_API_KEY: ${{ secrets.PRISM_ALL_PAT }}
13+
TARGET_REPO_PAT: ${{ secrets.PRISM_ALL_PAT }}
14+
VCPKG_ROOT: "/home/runner/work/prism_all/prism_all/prism_vcpkg/"
15+
16+
steps:
17+
- uses: nuget/setup-nuget@v2
18+
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
submodules: recursive
23+
24+
- name: Configure NuGet source
25+
run: |
26+
nuget sources Add \
27+
-Name GitHub \
28+
-Source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json \
29+
-Username ${{ github.actor }} \
30+
-Password ${{ secrets.PRISM_ALL_PAT }}
31+
32+
nuget setapikey ${{ secrets.PRISM_ALL_PAT }} \
33+
-Source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
34+
35+
- name: Setup vcpkg
36+
run: |
37+
git clone https://nocanstillbb:${TARGET_REPO_PAT}@github.com/cpp-prism/prism_vcpkg.git
38+
cd prism_vcpkg
39+
./bootstrap-vcpkg.sh
40+
41+
- name: Install dependencies
42+
run: |
43+
pwd
44+
sudo apt update && sudo apt install -y autoconf autoconf-archive automake libtool \
45+
'^libxcb.*-dev' \
46+
libx11-xcb-dev \
47+
libglu1-mesa-dev \
48+
libxrender-dev \
49+
libxi-dev \
50+
libxkbcommon-dev \
51+
libxkbcommon-x11-dev \
52+
libegl1-mesa-dev
53+
./prism_vcpkg/vcpkg install
54+
55+
56+
- name: Configure
57+
run: |
58+
sudo chmod +x ./build.sh
59+
./build.sh -DCMAKE_PREFIX_PATH=/home/runner/work/prism_all/prism_all/vcpkg_installed/x64-linux/ \
60+
-DCMAKE_INSTALL_PREFIX=/home/runner/work/prism_all/prism_all/vcpkg_installed/x64-linux/
61+
62+
63+
- name: vcpkg publish
64+
run: |
65+
git config --global user.email "kok.bing@qq.com"
66+
git config --global user.name "hbb"
67+
VERSION=$(cat version.txt)
68+
FULL_MSG=$(git log -1 --pretty=%B)
69+
TITLE=$(echo "$FULL_MSG" | head -n1)
70+
BODY=$(echo "$FULL_MSG" | tail -n +2)
71+
NEW_TITLE="[prism_all] ${TITLE} (${VERSION})"
72+
cd prism_vcpkg
73+
find . |grep -i prism
74+
git add . && git commit -m "$NEW_TITLE" -m "$BODY"
75+
./vcpkg --x-builtin-ports-root=./ports --x-builtin-registry-versions-dir=./versions x-add-version --all --verbose --overwrite-version
76+
git commit --amend --no-edit
77+
git push
78+

‎CMakeLists.txt‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
cmake_minimum_required(VERSION 3.14)
22
project(prism_all)
3-
set(PRISM_VERSION ${DV_VERSION})
3+
4+
if(NOT DEFINED PRISM_VERSION)
5+
file(READ "${CMAKE_CURRENT_LIST_DIR}/version.txt" FILE_CONTENT)
6+
string(STRIP "${FILE_CONTENT}" FILE_CONTENT)
7+
set(PRISM_VERSION "${FILE_CONTENT}" CACHE STRING "Prism version" FORCE)
8+
else()
9+
file(WRITE "${CMAKE_CURRENT_LIST_DIR}/version.txt" ${PRISM_VERSION})
10+
endif()
411

512
add_subdirectory(prism)
613
add_subdirectory(prism_container)

‎prism‎

‎prism_container‎

‎prism_qt_core‎

‎prism_qt_modular‎

‎prism_qt_ui‎

‎vcpkg.json‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "prism-all",
3+
"version": "1.0.0",
4+
"dependencies": [
5+
"fmt",
6+
"catch2",
7+
"sqlite3",
8+
"nlohmann-json",
9+
"zlog",
10+
{
11+
"name": "qtbase",
12+
"default-features": true
13+
},
14+
"qtdeclarative"
15+
],
16+
"builtin-baseline": "1f7891a68942258bc3bd954fa3d4ce70c67dc160",
17+
"overrides": [
18+
{
19+
"name": "qtbase",
20+
"version": "6.8.3"
21+
},
22+
{
23+
"name": "qtdeclarative",
24+
"version": "6.8.3"
25+
},
26+
{
27+
"name": "qttools",
28+
"version": "6.8.3"
29+
},
30+
{
31+
"name": "boost",
32+
"version": "1.83.0"
33+
},
34+
{
35+
"name": "opencv4",
36+
"version": "4.5.5#7"
37+
},
38+
{
39+
"name": "catch2",
40+
"version": "3.4.0"
41+
}
42+
]
43+
}

‎version.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.6

0 commit comments

Comments
 (0)