Skip to content

Commit 3aa0a19

Browse files
committed
Add vcpkg.json file
1 parent 5324317 commit 3aa0a19

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed

.github/workflows/vcpkg.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Vcpkg CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
matrix:
9+
os: [ubuntu-latest, macos-latest, windows-latest]
10+
runs-on: ${{ matrix.os }}
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Cache vcpkg
16+
uses: actions/cache@v4
17+
with:
18+
path: |
19+
${{github.workspace}}/vcpkg
20+
!${{github.workspace}}/vcpkg/buildtrees
21+
!${{github.workspace}}/vcpkg/packages
22+
!${{github.workspace}}/vcpkg/downloads
23+
${{ github.workspace }}/build/bin/Db*.solutions
24+
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}
25+
restore-keys: |
26+
${{ runner.os }}-vcpkg-
27+
28+
- name: Install dependencies (Ubuntu)
29+
if: runner.os == 'Linux'
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y build-essential cmake ninja-build autoconf automake autoconf-archive
33+
cmake --version
34+
ninja --version
35+
gcc --version
36+
g++ --version
37+
38+
- name: Install dependencies (macOS)
39+
if: runner.os == 'macOS'
40+
env:
41+
VCPKG_PYTHON3: $(which python3)
42+
run: |
43+
echo "VCPKG_PYTHON3=$VCPKG_PYTHON3" >> $GITHUB_ENV
44+
brew update
45+
brew install cmake ninja autoconf automake autoconf-archive
46+
cmake --version
47+
ninja --version
48+
clang --version
49+
50+
- name: Install dependencies (Windows)
51+
if: runner.os == 'Windows'
52+
uses: microsoft/setup-msbuild@v2
53+
54+
- name: Setup MSVC
55+
if: runner.os == 'Windows'
56+
uses: ilammy/msvc-dev-cmd@v1
57+
58+
- name: Setup vcpkg
59+
uses: lukka/run-vcpkg@v11
60+
with:
61+
vcpkgGitCommitId: '3508985146f1b1d248c67ead13f8f54be5b4f5da'
62+
vcpkgJsonGlob: '**/vcpkg.json'
63+
64+
- name: Configure CMake
65+
run: cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake -DOPENMIND_BUILD_TESTS=OFF || cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake -DOPENMIND_BUILD_TESTS=OFF
66+
67+
- name: Build
68+
run: cmake --build ${{github.workspace}}/build
69+
70+
- name: Get number of CPU cores
71+
uses: SimenB/github-actions-cpu-cores@v2
72+
id: cpu-cores
73+
74+
- name: Check
75+
working-directory: ${{github.workspace}}/build
76+
run: ctest . -j ${{steps.cpu-cores.outputs.count}} --test-dir libskrypt --rerun-failed --output-on-failure

vcpkg-configuration.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"default-registry": {
3+
"kind": "git",
4+
"baseline": "3508985146f1b1d248c67ead13f8f54be5b4f5da",
5+
"repository": "https://github.com/ohhmm/vcpkg",
6+
"reference": "openmind-port",
7+
"packages": [
8+
"openmind"
9+
]
10+
}
11+
}

0 commit comments

Comments
 (0)