@@ -23,53 +23,59 @@ outputs:
23
23
description : status of wheel build
24
24
value : ${{ steps.build.outputs.status }}
25
25
26
- # can we just pass in build args instead of updating the variables in version.py?
27
26
runs :
28
27
using : composite
29
28
steps :
30
29
- name : build
31
30
id : build
32
- shell : bash
33
31
run : |-
32
+ echo "::group::Installing virtualenv and creating a venv"
34
33
pip install virtualenv
35
34
virtualenv venv
35
+ echo "::endgroup::"
36
+
36
37
source venv/bin/activate
38
+
39
+ echo "::group::Installing setuptools-scm"
37
40
pip install setuptools-scm==8.2.0
41
+ echo "::endgroup::"
38
42
39
- BUILD_TYPE="dev "
43
+ export BUILD_TYPE="nightly "
40
44
if ${{ inputs.release }}; then
41
- export BUILD_TYPE="release"
45
+ BUILD_TYPE="release"
42
46
elif ${{ inputs.dev }}; then
43
- export BUILD_TYPE="dev"
44
- else
45
- export BUILD_TYPE="nightly"
47
+ BUILD_TYPE="dev"
46
48
fi
47
49
echo "BUILD_TYPE=${BUILD_TYPE}"
48
50
49
- makefile_path=$(find . -type f -name "Makefile")
50
- cd $(dirname ${makefile_path})
51
+ makefile_path=$(find . -maxdepth 2 -type f -name "Makefile")
52
+ echo "makefile_path=${makefile_path}"
53
+ makefile_dir=$(dirname "${makefile_path}")
54
+ echo "makefile_dir=${makefile_dir}"
55
+ cd "${makefile_dir}"
51
56
52
57
status=0
53
58
make build || status=$?
54
59
WHL_NAME=$(find dist -name '*.whl' -exec basename {} \;)
55
60
TARGZ_NAME=$(find dist -name '*.tar.gz' -exec basename {} \;)
56
61
57
62
# check if created wheel match build type
58
- if [[ $BUILD_TYPE = "dev" ]] && [[ ! "$WHL_NAME" =~ \.dev ]]; then
59
- echo "ERROR: $WHL_NAME not dev build"
63
+ if [[ ${ BUILD_TYPE} = "dev" ]] && [[ ! "${ WHL_NAME} " =~ \.dev ]]; then
64
+ echo "ERROR: ${ WHL_NAME} does not match dev build naming pattern "
60
65
status=1
61
66
fi
62
- if [[ $BUILD_TYPE = "release" ]] && ([[ "$WHL_NAME" =~ \.dev ]] || [[ "$WHL_NAME" =~ a[0-9]{8}- ]]); then
63
- echo "ERROR: $WHL_NAME not release build"
67
+ if [[ ${ BUILD_TYPE} = "release" ]] && ([[ "${ WHL_NAME} " =~ \.dev ]] || [[ "${ WHL_NAME} " =~ a[0-9]{8}- ]]); then
68
+ echo "ERROR: ${ WHL_NAME} does not match release build naming pattern "
64
69
status=1
65
70
fi
66
- if [[ $BUILD_TYPE = "nightly" ]] && [[ ! "$WHL_NAME" =~ a[0-9]{8}- ]]; then
67
- echo "ERROR: $WHL_NAME not nightly build"
71
+ if [[ ${ BUILD_TYPE} = "nightly" ]] && [[ ! "${ WHL_NAME} " =~ a[0-9]{8}- ]]; then
72
+ echo "ERROR: ${ WHL_NAME} does not match nightly build naming pattern "
68
73
status=1
69
74
fi
70
75
71
76
echo "=========== Build Status ==========="
72
- echo "whlname=$WHL_NAME" | tee -a "$GITHUB_OUTPUT"
73
- echo "tarname=$TARGZ_NAME" | tee -a "$GITHUB_OUTPUT"
77
+ echo "whlname=${ WHL_NAME} " | tee -a "$GITHUB_OUTPUT"
78
+ echo "tarname=${ TARGZ_NAME} " | tee -a "$GITHUB_OUTPUT"
74
79
echo "status=${status}" | tee -a "$GITHUB_OUTPUT"
75
80
exit ${status}
81
+ shell : bash
0 commit comments