From dfa6f6581468a94a2ca4a6a5c630ad85bf3ea29d Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Fri, 29 Dec 2023 19:38:32 +0000 Subject: [PATCH 1/6] Enable Linux64 builds --- .github/workflows/build.yaml | 2 +- autobuild.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5214f81..3f2a752 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ jobs: build: strategy: matrix: - os: [windows-2022, macos-11] #, ubuntu-22.04] + os: [windows-2022, macos-11, ubuntu-22.04] addrsize: ["64"] include: - os: windows-2022 diff --git a/autobuild.xml b/autobuild.xml index 81604e7..c1cb842 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -71,7 +71,7 @@ name darwin - linux + linux64 configurations @@ -91,7 +91,7 @@ lib/release/*.a name - linux + linux64 windows From 6ffb7a2ae3a16a5e0e9dcdaf4930649102043ae8 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Fri, 29 Dec 2023 20:45:12 +0100 Subject: [PATCH 2/6] Change library name to libmeshoptimizer.a --- build-cmd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-cmd.sh b/build-cmd.sh index de17730..fd09eb2 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -117,8 +117,8 @@ pushd "$MESHOPT_SOURCE_DIR" make install mkdir -p "$stage/lib/release" - mv "$stage/lib/meshoptimizer.a" \ - "$stage/lib/release/meshoptimizer.a" + mv "$stage/lib/libmeshoptimizer.a" \ + "$stage/lib/release/libmeshoptimizer.a" mkdir -p "$stage/include/meshoptimizer" mv "$stage/include/meshoptimizer.h" \ From dcbd841bbeb8909b92584902a2016b8b63ccfb2f Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Fri, 29 Dec 2023 20:48:23 +0100 Subject: [PATCH 3/6] Add missing popd --- build-cmd.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build-cmd.sh b/build-cmd.sh index fd09eb2..bd66da1 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -116,6 +116,8 @@ pushd "$MESHOPT_SOURCE_DIR" make -j $AUTOBUILD_CPU_COUNT make install + popd + mkdir -p "$stage/lib/release" mv "$stage/lib/libmeshoptimizer.a" \ "$stage/lib/release/libmeshoptimizer.a" From e403c78e6b7c13d5c43e0488810d50c88a0e8071 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Fri, 29 Dec 2023 19:58:39 +0000 Subject: [PATCH 4/6] Add VERSION.txt generation --- build-cmd.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build-cmd.sh b/build-cmd.sh index bd66da1..4628c10 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -127,6 +127,15 @@ pushd "$MESHOPT_SOURCE_DIR" "$stage/include/meshoptimizer/meshoptimizer.h" rm -r "$stage/lib/cmake" + + # populate version_file - prefer this method of regex extraction + # with a multitude of different tools - that can and does break over time. + gcc -DVERSION_HEADER_FILE="\"$VERSION_HEADER_FILE\"" \ + -DVERSION_MACRO="$VERSION_MACRO" \ + -o "$stage/version" "$top/version.c" + "$stage/version" > "$stage/VERSION.txt" + rm "$stage/version" + ;; esac mkdir -p "$stage/LICENSES" From f976344a2adbbbc54183701851073195f7b723eb Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Tue, 2 Jan 2024 19:19:54 +0100 Subject: [PATCH 5/6] Split pushd into it's own line and indent statements between pushd/popd Having the pushd tacked at the end of the mkdir statement can be confusing and easy to overlook. -> Break the statement into two lines and indent the code --- build-cmd.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/build-cmd.sh b/build-cmd.sh index 4628c10..97b4006 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -109,13 +109,12 @@ pushd "$MESHOPT_SOURCE_DIR" export CPPFLAGS="$TARGET_CPPFLAGS" fi - rm -rf build && mkdir build && pushd build - - cmake .. -DCMAKE_INSTALL_PREFIX:STRING="${stage}" \ - - make -j $AUTOBUILD_CPU_COUNT - make install - + rm -rf build && mkdir build + pushd build + cmake .. -DCMAKE_INSTALL_PREFIX:STRING="${stage}" \ + + make -j $AUTOBUILD_CPU_COUNT + make install popd mkdir -p "$stage/lib/release" From 815e655515735065c1b9e965f6c50f71e4a9d070 Mon Sep 17 00:00:00 2001 From: Nicky Dasmijn Date: Tue, 2 Jan 2024 19:32:13 +0100 Subject: [PATCH 6/6] Remove trailing backslash --- build-cmd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-cmd.sh b/build-cmd.sh index 97b4006..90fc2e7 100755 --- a/build-cmd.sh +++ b/build-cmd.sh @@ -111,7 +111,7 @@ pushd "$MESHOPT_SOURCE_DIR" rm -rf build && mkdir build pushd build - cmake .. -DCMAKE_INSTALL_PREFIX:STRING="${stage}" \ + cmake .. -DCMAKE_INSTALL_PREFIX:STRING="${stage}" make -j $AUTOBUILD_CPU_COUNT make install