Skip to content

Commit

Permalink
Merge pull request #1 from jjerphan/refactor/binary_encoding
Browse files Browse the repository at this point in the history
Sync with `main` + potential suggestions / rest of implementation (if any)
  • Loading branch information
baszalmstra authored Jul 29, 2024
2 parents 4c8c6e5 + 12ffa47 commit 1ba5ecf
Show file tree
Hide file tree
Showing 43 changed files with 9,071 additions and 62 deletions.
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/[email protected]
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/[email protected]
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/[email protected]
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

0 comments on commit 1ba5ecf

Please sign in to comment.