-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
336fd7e
commit 03fb3c4
Showing
2 changed files
with
75 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
on: [push, pull_request] | ||
on: [ push, pull_request, workflow_dispatch ] | ||
name: Build | ||
jobs: | ||
build-linux-memtest: | ||
|
@@ -21,43 +21,39 @@ jobs: | |
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- run: mkdir -p build | ||
- run: mkdir -p build | ||
- run: zip -r build/bindings.zip Autogenerated/Bindings | ||
|
||
- name: Archive bindings | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: bindings.zip | ||
path: build/bindings.zip | ||
- | ||
name: Set up Docker Buildx | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Docker Build | ||
- name: Docker Build | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./CI/Dockerfile | ||
platforms: linux/amd64 | ||
tags: lib3mf_ubi8:latest | ||
load: true | ||
- | ||
name: Docker Extract | ||
tags: lib3mf_ubi8:latest | ||
load: true | ||
- name: Docker Extract | ||
uses: shrink/[email protected] | ||
id: extract | ||
with: | ||
with: | ||
image: lib3mf_ubi8:latest | ||
path: out.zip | ||
destination: dist | ||
|
||
- run: unzip out.zip | ||
working-directory: ./dist | ||
- | ||
name: Upload Artifact | ||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf.so | ||
path: dist/lib3mf.so.2 | ||
path: dist/lib3mf.so.2 | ||
|
||
build-macos: | ||
runs-on: macos-latest | ||
|
@@ -119,7 +115,7 @@ jobs: | |
files: ./build/Test_CPP_Bindings_filtered.info | ||
fail_ci_if_error: true # optional (default = false) | ||
verbose: true # optional (default = false) | ||
|
||
build-windows-release: | ||
runs-on: windows-2019 | ||
steps: | ||
|
@@ -163,8 +159,8 @@ jobs: | |
path: build/Debug/lib3mf.pdb | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: lib3mf.debug.lib | ||
path: build/Debug/lib3mf.lib | ||
name: lib3mf.debug.lib | ||
path: build/Debug/lib3mf.lib | ||
build-windows-32bit: | ||
runs-on: windows-2019 | ||
steps: | ||
|
@@ -200,7 +196,7 @@ jobs: | |
working-directory: ./build | ||
assemble-sdk: | ||
runs-on: ubuntu-20.04 | ||
needs: [build-windows-release, build-macos, build-linux-ubi8-gcc12] | ||
needs: [ build-windows-release, build-macos, build-linux-ubi8-gcc12 ] | ||
steps: | ||
- run: sudo apt install -y zip unzip | ||
- run: mkdir build | ||
|
@@ -222,7 +218,7 @@ jobs: | |
path: build/lib3mf_sdk.zip | ||
deploy-linux: | ||
runs-on: ubuntu-20.04 | ||
needs: [assemble-sdk] | ||
needs: [ assemble-sdk ] | ||
steps: | ||
- run: sudo apt install -y zip unzip | ||
- run: pwd | ||
|
@@ -235,7 +231,7 @@ jobs: | |
- run: ls -Rl . | ||
- name: Unpack the SDK | ||
run: | | ||
unzip lib3mf_sdk.zip/lib3mf_sdk.zip | ||
unzip lib3mf_sdk.zip/lib3mf_sdk.zip | ||
- name: Build CppDynamic | ||
run: | | ||
sh Examples/CppDynamic/GenerateMake.sh | ||
|
@@ -250,7 +246,7 @@ jobs: | |
./Example_ExtractInfo ../../Files/Helix.3mf | ||
deploy-windows: | ||
runs-on: windows-2019 | ||
needs: [assemble-sdk] | ||
needs: [ assemble-sdk ] | ||
steps: | ||
- name: Download lib3mf_sdk artifact | ||
uses: actions/download-artifact@v2 | ||
|
@@ -259,7 +255,7 @@ jobs: | |
path: lib3mf_sdk.zip | ||
- name: Unpack the SDK | ||
run: | | ||
unzip lib3mf_sdk.zip/lib3mf_sdk.zip | ||
unzip lib3mf_sdk.zip/lib3mf_sdk.zip | ||
- name: Build CppDynamic | ||
run: | | ||
./Examples/CppDynamic/GenerateVS2019.bat | ||
|
@@ -274,7 +270,7 @@ jobs: | |
./Release/Example_ExtractInfo.exe ../../Files/Helix.3mf | ||
deploy-macos: | ||
runs-on: macos-latest | ||
needs: [assemble-sdk] | ||
needs: [ assemble-sdk ] | ||
steps: | ||
- name: Download lib3mf_sdk artifact | ||
uses: actions/download-artifact@v2 | ||
|
@@ -283,7 +279,7 @@ jobs: | |
path: lib3mf_sdk.zip | ||
- name: Unpack the SDK | ||
run: | | ||
unzip lib3mf_sdk.zip/lib3mf_sdk.zip | ||
unzip lib3mf_sdk.zip/lib3mf_sdk.zip | ||
- name: Build CppDynamic | ||
run: | | ||
sh Examples/CppDynamic/GenerateMake.sh | ||
|
@@ -295,4 +291,57 @@ jobs: | |
sh Examples/Cpp/GenerateMake.sh | ||
cd Examples/Cpp/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
integration_tests-latest-release: | ||
runs-on: ubuntu-20.04 | ||
if: github.event_name == 'workflow_dispatch' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Get latest release info from GitHub API | ||
id: get_release | ||
run: | | ||
LATEST_RELEASE_URL=$(curl -s https://api.github.com/repos/3MFConsortium/test_suites/releases/latest | grep "zipball_url" | cut -d '"' -f 4) | ||
echo "LATEST_RELEASE_URL=${LATEST_RELEASE_URL}" >> $GITHUB_ENV | ||
- name: Download latest SDK zip | ||
run: | | ||
wget ${{ env.LATEST_RELEASE_URL }} -O latest_release.zip | ||
- name: Unpack the SDK | ||
run: | | ||
unzip latest_release.zip -d lib3mf_sdk | ||
- name: Build CppDynamic | ||
run: | | ||
sh lib3mf_sdk/Examples/CppDynamic/GenerateMake.sh | ||
cd lib3mf_sdk/Examples/CppDynamic/build | ||
cmake --build . | ||
./Example_ExtractInfo ../../Files/Helix.3mf | ||
- name: Download and unzip test suite | ||
run: | | ||
wget https://github.com/3MFConsortium/test_suites/releases/download/v2.0.0/3MF_Conformance_Test_Suites_v2.0.0.zip | ||
unzip 3MF_Conformance_Test_Suites_v2.0.0.zip -d test_suites | ||
- name: Copy integration test script | ||
run: | | ||
cp CI/integration_test.py test_suites/3MF_Conformance_Test_Suites_v2.0.0/ | ||
- name: Run integration tests | ||
run: | | ||
python test_suites/3MF_Conformance_Test_Suites_v2.0.0/integration_test.py |
This file was deleted.
Oops, something went wrong.