Skip to content

Commit

Permalink
revert ci fixes and hard code mac
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaiaeroastro committed Jan 23, 2025
1 parent f8e737d commit 1a631b9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 35 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,17 @@ jobs:
runs-on: ubuntu-20.04
outputs:
lib3mf-version: ${{ steps.set-version.outputs.LIB3MF_VERSION }}
lib3mf-version-with-pre-release: ${{ steps.set-version.outputs.LIB3MF_VERSION_WITH_PRE_RELEASE }}
lib3mf-version-with-modified-pre-release: ${{ steps.set-version.outputs.LIB3MF_VERSION_WITH_MODIFIED_PRE_RELEASE }}
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Run version extraction script and set environment variables
- name: Run version extraction script and set environment variable
id: set-version
run: |
VERSION_OUTPUT=$(python CI/ci_cd_helper.py extract-version)
CORE_VERSION=$(echo "$VERSION_OUTPUT" | jq -r '.core_version')
CORE_VERSION_WITH_PRE_RELEASE=$(echo "$VERSION_OUTPUT" | jq -r '.core_version_with_pre_release')
CORE_VERSION_WITH_MODIFIED_PRE_RELEASE=$(echo "$VERSION_OUTPUT" | jq -r '.core_version_with_modified_pre_release')
echo "LIB3MF_VERSION=$CORE_VERSION" >> $GITHUB_OUTPUT
echo "LIB3MF_VERSION_WITH_PRE_RELEASE=$CORE_VERSION_WITH_PRE_RELEASE" >> $GITHUB_OUTPUT
echo "LIB3MF_VERSION_WITH_MODIFIED_PRE_RELEASE=$CORE_VERSION_WITH_MODIFIED_PRE_RELEASE" >> $GITHUB_OUTPUT
- name: Echo versions for debug
run: |
echo "LIB3MF_VERSION=${{ steps.set-version.outputs.LIB3MF_VERSION }}"
echo "LIB3MF_VERSION_WITH_PRE_RELEASE=${{ steps.set-version.outputs.LIB3MF_VERSION_WITH_PRE_RELEASE }}"
echo "LIB3MF_VERSION_WITH_MODIFIED_PRE_RELEASE=${{ steps.set-version.outputs.LIB3MF_VERSION_WITH_MODIFIED_PRE_RELEASE }}"
LIB3MF_VERSION=$(python CI/ci_cd_helper.py extract-version)
echo "LIB3MF_VERSION=$LIB3MF_VERSION" >> $GITHUB_OUTPUT
- name: Echo version for debug
run: echo "LIB3MF_VERSION=${{ steps.set-version.outputs.LIB3MF_VERSION }}"

build-linux-memtest:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -149,7 +135,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: lib3mf.dylib
path: build/lib3mf.${{ env.LIB3MF_VERSION }}.dylib
path: build/lib3mf.${{ env.LIB3MF_VERSION }}.0.dylib
- name: Upload Artifact (CPacked Archive)
uses: actions/upload-artifact@v4
with:
Expand Down
16 changes: 3 additions & 13 deletions CI/ci_cd_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,10 @@ def extract_version_from_cmake():
raise ValueError("Could not find version components in CMakeLists.txt")

version = f"{major.group(1)}.{minor.group(1)}.{micro.group(1)}"

core_version = version
core_version_with_pre_release = version
core_version_with_modified_pre_release = version
if prerelease and prerelease.group(1):
core_version_with_pre_release += ".{0}".format(prerelease.group(1))
core_version_with_modified_pre_release += ".0"
version += f"-{prerelease.group(1)}"

# Return all three values as a JSON object
return json.dumps({
"core_version": core_version,
"core_version_with_pre_release": core_version_with_pre_release,
"core_version_with_modified_pre_release": core_version_with_modified_pre_release
})
return version

def get_integration_sdk_url(index):
url = "https://api.github.com/repos/3MFConsortium/test_suites/releases"
Expand Down Expand Up @@ -113,4 +103,4 @@ def main():
parser.print_help()

if __name__ == "__main__":
main()
main()
2 changes: 0 additions & 2 deletions SDK/GenerateSDK_github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ mkdir -p $SDKARTIFACT/Bin || failed "Error creating Bin-folder"
mkdir -p $SDKARTIFACT/Lib || failed "Error creating Lib-folder"


echo ${LIB3MF_VERSION_WITH_MODIFIED_PRE_RELEASE}
echo Copy binaries
cp $LOCATION/lib3mf.dll/lib3mf.dll $SDKARTIFACT/Bin/ || failed "Error copying binary"
cp $LOCATION/lib3mf.so/lib3mf.so.2 $SDKARTIFACT/Bin/lib3mf.so || failed "Error copying binary"
ls -lR $LOCATION/lib3mf.dylib
cp $LOCATION/lib3mf.dylib/lib3mf.2.4.1.0.dylib $SDKARTIFACT/Bin/lib3mf.dylib || failed "Error copying binary"
cp $LOCATION/lib3mf.lib/lib3mf.lib $SDKARTIFACT/Lib/ || failed "Error copying binary"

Expand Down

0 comments on commit 1a631b9

Please sign in to comment.