Skip to content

Commit

Permalink
Merge pull request #14 from prisms-center/2.0a3
Browse files Browse the repository at this point in the history
2.0a3
  • Loading branch information
bpuchala authored Sep 29, 2023
2 parents 25ba40f + e2e0009 commit 6888ddf
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 98 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/test-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ name: Testing build on ubuntu-latest
on: [push, pull_request]

env:
SKBUILD_CONFIGURE_OPTIONS: -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0'
SKBUILD_BUILD_OPTIONS: --verbose

jobs:
build-depends:
uses: ./.github/workflows/test-linux-dependencies.yml

build:
needs: build-depends
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand All @@ -21,16 +24,28 @@ jobs:
sudo apt-get update
sudo apt-get install build-essential cmake
pip install --upgrade pip wheel build
pip install -r test_requirements.txt
echo "SKBUILD_CONFIGURE_OPTIONS=${{ env.SKBUILD_CONFIGURE_OPTIONS }}" >> "$GITHUB_ENV"
echo "SKBUILD_BUILD_OPTIONS=${{ env.SKBUILD_BUILD_OPTIONS }}" >> "$GITHUB_ENV"
### libcasm-global ###
- name: restore libcasm-global cache
id: cache-libcasm-global-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3

- name: Install CASM dependencies
run: |
pip install CASMcode_global/dist/*.whl
pip install -r build_requirements.txt
pip install -r test_requirements.txt
- name: make
shell: bash
run: |
python -m build
- name: install
- name: make install
shell: bash
run: |
pip install dist/*.whl
Expand All @@ -39,10 +54,3 @@ jobs:
shell: bash
run: |
python -m pytest -rsap python/tests
- name: upload libcasm-xtal-ubuntu-latest-x86_64-dist
if: always()
uses: actions/upload-artifact@v3
with:
name: libcasm-xtal-ubuntu-latest-x86_64-dist
path: dist
24 changes: 22 additions & 2 deletions .github/workflows/test-linux-cxx-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ name: Testing c++ only on ubuntu-latest

on: [push, pull_request]

env:
SKBUILD_BUILD_OPTIONS: --verbose

jobs:
build-depends:
uses: ./.github/workflows/test-linux-dependencies.yml

build:
runs-on: ubuntu-latest
timeout-minutes: 60
Expand All @@ -16,14 +22,28 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install build-essential cmake
pip install --upgrade pip wheel build
echo "SKBUILD_BUILD_OPTIONS=${{ env.SKBUILD_BUILD_OPTIONS }}" >> "$GITHUB_ENV"
### libcasm-global ###
- name: restore libcasm-global cache
id: cache-libcasm-global-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3

- name: Install CASM dependencies
run: |
pip install CASMcode_global/dist/*.whl
pip install -r build_requirements.txt
- name: configure
shell: bash
run: |
mkdir build_cxx_only
cd build_cxx_only
cmake -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' -DCMAKE_BUILD_TYPE=Release ..
cmake -DCMAKE_BUILD_TYPE=Release ..
- name: make
shell: bash
Expand All @@ -42,7 +62,7 @@ jobs:
run: |
mkdir build_cxx_test
cd build_cxx_test
cmake -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' -DCMAKE_BUILD_TYPE=Release ../tests
cmake -DCMAKE_BUILD_TYPE=Release ../tests
- name: make tests
shell: bash
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/test-linux-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build CASM dependencies on Ubuntu

on:
workflow_call:

jobs:
build-depends:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Set up requirements & configuration variables
run: |
sudo apt-get update
sudo apt-get install build-essential cmake
pip install --upgrade pip wheel build
### libcasm-global ###
- name: restore libcasm-global cache
id: cache-libcasm-global-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3

- name: checkout libcasm-global
if: steps.cache-libcasm-global-restore.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: prisms-center/CASMcode_global
path: CASMcode_global
ref: v2.0.3

- name: make global
if: steps.cache-libcasm-global-restore.outputs.cache-hit != 'true'
shell: bash
run: |
cd CASMcode_global
git submodule update --init --recursive
python -m build
pip install dist/*.whl
pip install -r test_requirements.txt
python -m pytest -rsap python/tests
- name: save libcasm-global cache
id: cache-libcasm-global-save
uses: actions/cache/save@v3
with:
path: CASMcode_global/dist
key: ${{ steps.cache-libcasm-global-restore.outputs.cache-primary-key }}
75 changes: 0 additions & 75 deletions .github/workflows/test-linux-source.yml

This file was deleted.

21 changes: 18 additions & 3 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ name: Testing on ubuntu-latest
on: [push, pull_request]

env:
SKBUILD_CONFIGURE_OPTIONS: -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0'
SKBUILD_BUILD_OPTIONS: --verbose

jobs:
build-depends:
uses: ./.github/workflows/test-linux-dependencies.yml

build:
needs: build-depends
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand All @@ -21,10 +24,21 @@ jobs:
sudo apt-get update
sudo apt-get install build-essential cmake
pip install --upgrade pip wheel
pip install -r test_requirements.txt
echo "SKBUILD_CONFIGURE_OPTIONS=${{ env.SKBUILD_CONFIGURE_OPTIONS }}" >> "$GITHUB_ENV"
echo "SKBUILD_BUILD_OPTIONS=${{ env.SKBUILD_BUILD_OPTIONS }}" >> "$GITHUB_ENV"
### libcasm-global ###
- name: restore libcasm-global cache
id: cache-libcasm-global-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3

- name: Install CASM dependencies
run: |
pip install CASMcode_global/dist/*.whl
pip install -r build_requirements.txt
- name: make
shell: bash
run: |
Expand All @@ -33,6 +47,7 @@ jobs:
- name: make test
shell: bash
run: |
pip install -r test_requirements.txt
python -m pytest -rsap python/tests
- name: Set up doc requirements
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [2.0a2] - 2023-08-11
## [2.0a3] - 2023-08-11

This release separates out casm/crystallography from CASM v1, in particular removing remaining dependencies on casm/symmetry for constructing symmetry representations and getting basic symmetry operation info. It creates a Python package, libcasm.xtal, that enables using casm/crystallography and may be installed via pip install, using scikit-build, CMake, and pybind11. This release also includes usage and API documentation for using libcasm.xtal, built using Sphinx.

Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,13 @@ target_link_libraries(casm_crystallography
${CMAKE_DL_LIBS}
CASM::casm_global
)

if(APPLE)
set_target_properties(
casm_crystallography PROPERTIES INSTALL_RPATH "@loader_path")
else()
set_target_properties(
casm_crystallography PROPERTIES INSTALL_RPATH "$ORIGIN")
endif()

##############################################
## Install libcasm_crystallography
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ target_link_libraries(casm_crystallography
${CMAKE_DL_LIBS}
CASM::casm_global
)

if(APPLE)
set_target_properties(
casm_crystallography PROPERTIES INSTALL_RPATH "@loader_path")
else()
set_target_properties(
casm_crystallography PROPERTIES INSTALL_RPATH "$ORIGIN")
endif()

##############################################
## Install libcasm_crystallography
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "libcasm-xtal"
version = "2.0a2"
version = "2.0a3"
authors = [
{ name="CASM developers", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion python/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
# The short X.Y version.
version = "2.0"
# The full version, including alpha/beta/rc tags.
release = "2.0a2"
release = "2.0a3"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

__version__ = "2.0a2"
__version__ = "2.0a3"

# Available at setup time due to pyproject.toml
from pybind11.setup_helpers import Pybind11Extension, build_ext
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="libcasm-xtal",
version="2.0a2",
version="2.0a3",
packages=["libcasm", "libcasm.xtal"],
package_dir={"": "python"},
cmake_install_dir="python/libcasm",
Expand Down

0 comments on commit 6888ddf

Please sign in to comment.