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

Sync with main + potential suggestions / rest of implementation (if any) #1

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
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
BasedOnStyle: Google
IndentWidth: 4
IndentAccessModifiers: false
AccessModifierOffset: -4
ColumnLimit: 100
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML

77 changes: 77 additions & 0 deletions .github/workflows/cpp-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
on:
push:
branches:
- "main"
pull_request:

name: C++

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
format:
name: Format and Lint
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4

- uses: prefix-dev/setup-pixi@v0.8.1
with:
environments: format-cpp

- name: Ensure code is properly formatted
run: |
pixi run format-cpp
git diff --exit-code

test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macOS-latest, macOS-14, windows-latest ]
runs-on: ${{ matrix.os }}
needs: [ format ]
steps:
- name: Checkout source code
uses: actions/checkout@v4

- uses: prefix-dev/setup-pixi@v0.8.1
with:
environments: test-cpp

- name: Run the tests
run: |
pixi run test-cpp

package:
name: Create conda packages
strategy:
matrix:
include:
- os: ubuntu-latest
target-platform: linux-64
- os: ubuntu-latest
target-platform: linux-aarch64
- os: windows-latest
target-platform: win-64
- os: macos-latest
target-platform: osx-64
- os: macos-14
target-platform: osx-arm64
runs-on: ${{ matrix.os }}
needs: [ format ]
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Build conda package
uses: prefix-dev/rattler-build-action@v0.2.11
with:
recipe-path: recipe/recipe.yaml
# needs to be unique for each matrix entry
artifact-name: package-${{ matrix.target-platform }}
build-args: --target-platform ${{ matrix.target-platform }}${{ matrix.target-platform == 'linux-aarch64' && ' --no-test' || '' }}

4 changes: 2 additions & 2 deletions .github/workflows/rust-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ jobs:
- name: Run clippy
run: cargo clippy

build:
name: ubuntu-latest
test:
name: Test
runs-on: ubuntu-latest
needs: [ format_and_lint ]
steps:
Expand Down
15 changes: 11 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

**/.DS_Store

build/
# pixi environments
.pixi
*.egg-info

# Ignore rattler-build output directory
output/

# Any resolvo snapshots in the root
snapshot-*.json
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.2](https://github.com/mamba-org/resolvo/compare/resolvo-v0.6.1...resolvo-v0.6.2) - 2024-06-11

### Added
- release-plz resolvo_cpp
- add rattler-build recipe ([#47](https://github.com/mamba-org/resolvo/pull/47))
- c++ bindings ([#41](https://github.com/mamba-org/resolvo/pull/41))

## [0.6.1](https://github.com/mamba-org/resolvo/compare/resolvo-v0.6.0...resolvo-v0.6.1) - 2024-06-10

### Added
- add `DependencySnapshot` ([#44](https://github.com/mamba-org/resolvo/pull/44))

### Fixed
- publish state of tool

## [0.6.0](https://github.com/mamba-org/resolvo/compare/v0.5.0...v0.6.0) - 2024-06-07

### Other
Expand Down
35 changes: 35 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.21)

project(resolvo LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(FeatureSummary)

option(RESOLVO_BUILD_TESTING "Build tests" OFF)
add_feature_info(RESOLVO_BUILD_TESTING RESOLVO_BUILD_TESTING
"configure whether to build the test suite")
include(CTest)

set(RESOLVO_IS_TOPLEVEL_BUILD TRUE)

# Place all compiled examples into the same bin directory on Windows, where
# we'll also put the dll
if(WIN32)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/debug)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/release)
elseif(APPLE)
# On macOS, the resolvo_cpp.dylib's install_name uses @rpath. CMake doesn't
# set BUILD_RPATH for imported targets though, so include the directory here
# by hand in the rpath used to build binaries in the build tree (such as our
# examples or tests).
set(CMAKE_BUILD_RPATH ${CMAKE_BINARY_DIR}/cpp)
endif()

add_subdirectory(cpp/)

feature_summary(WHAT ENABLED_FEATURES DESCRIPTION "Enabled features:")
feature_summary(WHAT DISABLED_FEATURES DESCRIPTION "Disabled features:")
Loading