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

[DRAFT] Replace Conan with vcpkg #356

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
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
45 changes: 0 additions & 45 deletions .github/workflows/pull-request-closed.yml

This file was deleted.

48 changes: 32 additions & 16 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"

jobs:
pre-commit:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -38,16 +41,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache conan packages
id: cache-conan
uses: actions/cache@v4
with:
# conan cache files are stored in `~/.conan` on Linux/macOS
path: ~/.conan
key:
conan-packages-${{ runner.os }}-hash-${{ hashFiles('conanfile.py') }}
restore-keys: |
conan-packages-${{ runner.os }}-hash-
- name: Cache pip modules
id: cache-pip
uses: actions/cache@v4
Expand All @@ -58,19 +51,42 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: "Install swig and cmake"
run: sudo apt-get update && sudo apt-get install build-essential cmake gtk2.0 libgtk2.0-dev ninja-build swig -y
- name: "Install python packages"
run: sudo apt-get install python3-setuptools python3-tk
- name: "Install system dependencies"
run: |
sudo apt-get update
sudo apt-get install -y \
cmake ninja-build build-essential \
pkg-config autoconf automake libtool \
zip unzip \
bison swig \
libx11-dev libxft-dev libxext-dev libgles2-mesa-dev \
libxi-dev libxtst-dev libxrandr-dev libltdl-dev \
gtk2.0 libgtk2.0-dev \
python3-setuptools python3-jinja2 python3-tk
- # https://github.com/lukka/CppBuildTasks-Validation/blob/v10/.github/workflows/hosted-ninja-vcpkg.yml
name: "Install vcpkg"
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
vcpkgJsonGlob: "src/vcpkg.json"
vcpkgConfigurationJsonGlob: "src/vcpkg-configuration.json"
- name: "Create virtual Environment"
run: |
python${{ matrix.python-version }} -m venv .venv
source .venv/bin/activate
echo "VIRTUAL ENV:" $VIRTUAL_ENV
- name: "Install wheel and conan package"
- name: "Install required Python dependencies"
run: source .venv/bin/activate && pip3 install -r requirements.txt
- name: "Generate build recipes"
run: source .venv/bin/activate && cmake -S src/ -B dist3/ --preset base
- name: "Upload failure logs"
if: failure()
uses: actions/upload-artifact@v4
with:
name: libxcrypt-logs-${{ matrix.python-version }}
path: /home/runner/work/basilisk/b/vcpkg/buildtrees/libxcrypt/*.log
- name: "Build basilisk"
run: source .venv/bin/activate && python3 conanfile.py --opNav True
run: source .venv/bin/activate && cmake --build dist3/
- name: "Run Python Tests"
run: |
source .venv/bin/activate
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ supportData/EphemerisData/de430.bsp
venv/
.venv/
examples/MonteCarloExamples/scenario_AttFeedbackMC/

CMakeUserPresets.json
Loading
Loading