Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vcpkg.json file #34

Merged
merged 1 commit into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/workflows/vcpkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Vcpkg CI

on: [push]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Cache vcpkg
uses: actions/cache@v4
with:
path: |
${{github.workspace}}/vcpkg
!${{github.workspace}}/vcpkg/buildtrees
!${{github.workspace}}/vcpkg/packages
!${{github.workspace}}/vcpkg/downloads
${{ github.workspace }}/build/bin/Db*.solutions
key: ${{ runner.os }}-vcpkg-${{ hashFiles('**/vcpkg.json') }}
restore-keys: |
${{ runner.os }}-vcpkg-

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build autoconf automake autoconf-archive
cmake --version
ninja --version
gcc --version
g++ --version

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
env:
VCPKG_PYTHON3: $(which python3)
run: |
echo "VCPKG_PYTHON3=$VCPKG_PYTHON3" >> $GITHUB_ENV
brew update
brew install cmake ninja autoconf automake autoconf-archive
cmake --version
ninja --version
clang --version

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v2

- name: Setup MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: '3508985146f1b1d248c67ead13f8f54be5b4f5da'
vcpkgJsonGlob: '**/vcpkg.json'

- name: Configure CMake
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

- name: Build
run: cmake --build ${{github.workspace}}/build

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores

- name: Check
working-directory: ${{github.workspace}}/build
run: ctest . -j ${{steps.cpu-cores.outputs.count}} --test-dir libskrypt --rerun-failed --output-on-failure
11 changes: 11 additions & 0 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"default-registry": {
"kind": "git",
"baseline": "3508985146f1b1d248c67ead13f8f54be5b4f5da",
"repository": "https://github.com/ohhmm/vcpkg",
"reference": "openmind-port",
"packages": [
"openmind"
]
}
}
Loading