Skip to content

Commit 408aaea

Browse files
committed
Address some comments on PR
1 parent abe4cd7 commit 408aaea

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

.github/workflows/build-cibw.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ jobs:
2424
with:
2525
python-version: ${{ matrix.python_version }}
2626

27-
- name: Set Nightly Flag
28-
run: echo "NIGHTLY=1" >> $GITHUB_ENV
27+
- name: Set Develop Flag
28+
run: |
29+
echo "DEVELOP=1" >> $GITHUB_ENV
30+
echo "COMMIT_HASH=$(git rev-parse --short=7 "$GITHUB_SHA")" >> $GITHUB_ENV
2931
3032
- name: Install Dependencies
3133
run: |
@@ -41,7 +43,7 @@ jobs:
4143
CIBW_BUILD: cp${{ matrix.cibw_python_version }}-${{ matrix.platform_id }}
4244
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }}
4345
CIBW_ARCHS: all
44-
CIBW_ENVIRONMENT_PASS_LINUX: NIGHTLY
46+
CIBW_ENVIRONMENT_PASS_LINUX: DEVELOP COMMIT_HASH
4547

4648
CIBW_BUILD_FRONTEND: "build"
4749
CIBW_BEFORE_ALL: bash {project}/build_tools/wheels/cibw_before_all.sh ${{ matrix.python_version }} {project}

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ set (GTSAM_VERSION_PATCH 0)
1010
set (GTSAM_PRERELEASE_VERSION "a0")
1111
math (EXPR GTSAM_VERSION_NUMERIC "10000 * ${GTSAM_VERSION_MAJOR} + 100 * ${GTSAM_VERSION_MINOR} + ${GTSAM_VERSION_PATCH}")
1212

13-
if (DEFINED ENV{NIGHTLY})
14-
string(TIMESTAMP NOW "%Y.%m.%d.%H.%M")
15-
set (GTSAM_VERSION_STRING "${NOW}")
16-
set (SETUP_NAME "gtsam-nightly")
13+
if (DEFINED ENV{DEVELOP})
14+
set (GTSAM_VERSION_STRING "${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}${GTSAM_PRERELEASE_VERSION}.$ENV{COMMIT_HASH}")
15+
set (SETUP_NAME "gtsam-develop")
1716
elseif ("${GTSAM_PRERELEASE_VERSION}" STREQUAL "")
1817
set (GTSAM_VERSION_STRING "${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}.${GTSAM_VERSION_PATCH}")
1918
set (SETUP_NAME "gtsam")

build_tools/wheels/build_wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set -e
44
set -x
55

66
python -m pip install cibuildwheel
7-
python -m cibuildwheel build/python --output-dir wheelhouse
7+
python -m cibuildwheel build/python --output-dir wheelhouse

build_tools/wheels/cibw_before_all.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
# This script is invoked prior to building the wheels with cibuildwheel. It is used in the build-cibw.yml workflow in .github/workflows.
4+
# It installs the necessary dependencies and builds the wrapper module for the specified Python version.
5+
36
set -e
47
set -x
58

0 commit comments

Comments
 (0)