From 26c496d93647dd589af6c07c2273801ff7b49950 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 1 Mar 2021 10:06:10 -0800 Subject: Use -split-sections in creating release binary. This is supposed to reduce executable size. --- linux/make_artifacts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index 34c0bd082..f0ff00f1a 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -16,7 +16,7 @@ ghc --version cabal v2-update cabal v2-clean -cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-optc-Os -optl=-pthread' pandoc +cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-split-sections -optc-Os -optl=-pthread' pandoc cabal v2-build cabal v2-test -j1 for f in $(find dist-newstyle -name 'pandoc' -type f -perm /400); do cp $f /artifacts/; done -- cgit v1.2.3 From 086406cadfc480dcd2b1ca3085caf310247c0071 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 6 Mar 2021 13:44:14 -0800 Subject: linux build script: handle architecture for aarch64. --- linux/make_artifacts.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'linux') diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index f0ff00f1a..08132c353 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -2,9 +2,10 @@ set -e MACHINE=$(uname -m) case "$MACHINE" in - x86_64) ARCHITECTURE=amd64;; - i686) ARCHITECTURE=i386;; - i386) ARCHITECTURE=i386;; + x86_64) ARCHITECTURE=amd64;; + i686) ARCHITECTURE=i386;; + i386) ARCHITECTURE=i386;; + aarch64) ARCHITECTURE=arm64;; esac ARTIFACTS="${ARTIFACTS:-/artifacts}" -- cgit v1.2.3 From 1eb882fcdb6f1e8debde4a9805a69b815c574c64 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 6 Mar 2021 13:45:16 -0800 Subject: linux build script: set architecture to 'unknown' when no match. --- linux/make_artifacts.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'linux') diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index 08132c353..eb603571a 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -6,6 +6,7 @@ case "$MACHINE" in i686) ARCHITECTURE=i386;; i386) ARCHITECTURE=i386;; aarch64) ARCHITECTURE=arm64;; + *) ARCHITECTURE=unknown;; esac ARTIFACTS="${ARTIFACTS:-/artifacts}" -- cgit v1.2.3 From 31ca011e4a927f07a0619c0c73d380d30d2edf77 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 8 Mar 2021 11:58:14 -0800 Subject: Use correct architecture in .tar.gz for linux. --- linux/make_artifacts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index eb603571a..b32384ed4 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -70,5 +70,5 @@ mv pandoc $TARGET/bin strip $TARGET/bin/pandoc gzip -9 $TARGET/share/man/man1/pandoc.1 -tar cvzf $TARGET-linux-amd64.tar.gz $TARGET +tar cvzf $TARGET-linux-$ARCHITECTURE.tar.gz $TARGET rm -r $TARGET -- cgit v1.2.3 From cac796e1ab4ed170658d9056b27368e30cde3fcb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 8 Mar 2021 14:51:03 -0800 Subject: ARM build script: more reliable detection of completion. Previously we downloaded the tar.gz before it was complete. --- linux/make_artifacts.sh | 9 +++++++++ tools/build-arm.sh | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index b32384ed4..43002218e 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -11,6 +11,13 @@ esac ARTIFACTS="${ARTIFACTS:-/artifacts}" +rm $ARTIFACTS/* + +clean_up() { + echo "All done!" > "$ARTIFACTS/DONE" +} +trap clean_up EXIT + # build binaries cabal --version @@ -72,3 +79,5 @@ gzip -9 $TARGET/share/man/man1/pandoc.1 tar cvzf $TARGET-linux-$ARCHITECTURE.tar.gz $TARGET rm -r $TARGET + +exit 0 diff --git a/tools/build-arm.sh b/tools/build-arm.sh index e413e5437..dc13e1435 100644 --- a/tools/build-arm.sh +++ b/tools/build-arm.sh @@ -86,7 +86,7 @@ do # print last line of log output and free memory $SSH "tail -n1 src/pandoc/docker.log && free -h | grep Mem" # Check to see if the artifact has been produced - $SSH "ls -l src/pandoc/linux/artifacts/*.tar.gz 2>/dev/null" && break + $SSH "ls -l src/pandoc/linux/artifacts/DONE 2>/dev/null" && break done # Retrieve the artifacts -- cgit v1.2.3 From 0515c448592e2b24f79e8a7bd249b396f4f0da62 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 8 Mar 2021 15:02:26 -0800 Subject: linux/make_artifacts.sh: Use -f when removing artifacts/DONE. --- linux/make_artifacts.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux') diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index 43002218e..043b3f9f2 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -11,7 +11,8 @@ esac ARTIFACTS="${ARTIFACTS:-/artifacts}" -rm $ARTIFACTS/* +# This is our sentinel that tells us when we're done. +rm -f $ARTIFACTS/DONE clean_up() { echo "All done!" > "$ARTIFACTS/DONE" -- cgit v1.2.3 From 94c917c13feed49c2d5ad278849456a488673347 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 16 Mar 2021 13:16:19 -0700 Subject: Use -j4 for linux release build. --- linux/make_artifacts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux') diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index 043b3f9f2..cb7bf4c8c 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -26,9 +26,9 @@ ghc --version cabal v2-update cabal v2-clean -cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-split-sections -optc-Os -optl=-pthread' pandoc +cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-j4 +RTS -A256m -RTS -split-sections -optc-Os -optl=-pthread' pandoc cabal v2-build -cabal v2-test -j1 +cabal v2-test -j4 for f in $(find dist-newstyle -name 'pandoc' -type f -perm /400); do cp $f /artifacts/; done # make deb -- cgit v1.2.3 From 89a89a8cf33e1558e8a477f98a2c73bc224ccf60 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 18 Mar 2021 09:14:12 -0700 Subject: make_artifacts.sh: try using -j for cabal rather than -j4 ghc-options. --- Makefile | 4 ++-- linux/make_artifacts.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'linux') diff --git a/Makefile b/Makefile index 5e5bc7c51..ced5baf9f 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ quick: quick-cabal: cabal new-configure . --ghc-options '$(GHCOPTS)' --disable-optimization --enable-tests - cabal new-build . --disable-optimization + cabal new-build -j4 . --disable-optimization cabal new-run test-pandoc --disable-optimization -- --hide-successes $(TESTARGS) full-cabal: @@ -35,7 +35,7 @@ full-cabal: cabal new-run test-pandoc --disable-optimization -- --hide-successes $(TESTARGS) full: - stack install --flag 'pandoc:embed_data_files' --flag 'pandoc:trypandoc' --bench --no-run-benchmarks --test --test-arguments='-j4 --hide-successes' --ghc-options '-Wall -Werror -fno-warn-unused-do-bind -O0 -j4 $(GHCOPTS)' + stack install --flag 'pandoc:embed_data_files' --flag 'pandoc:trypandoc' --bench --no-run-benchmarks --test --test-arguments='-j4 --hide-successes' --ghc-options '-Wall -Werror -fno-warn-unused-do-bind -O0 $(GHCOPTS)' ghci: stack ghci --flag 'pandoc:embed_data_files' diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index cb7bf4c8c..b5625be1f 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -26,9 +26,9 @@ ghc --version cabal v2-update cabal v2-clean -cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-j4 +RTS -A256m -RTS -split-sections -optc-Os -optl=-pthread' pandoc -cabal v2-build -cabal v2-test -j4 +cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '+RTS -A256m -RTS -split-sections -optc-Os -optl=-pthread' pandoc +cabal v2-build -j +cabal v2-test -j for f in $(find dist-newstyle -name 'pandoc' -type f -perm /400); do cp $f /artifacts/; done # make deb -- cgit v1.2.3 From 87eb8dfda4914dd8738c9ae0d9b591e65d8bf7e2 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 18 Mar 2021 14:59:50 -0700 Subject: Revert the -j related changes in make_artifacts.sh. This led to very slow build times. --- linux/make_artifacts.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linux') diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh index b5625be1f..4395b3c6b 100644 --- a/linux/make_artifacts.sh +++ b/linux/make_artifacts.sh @@ -26,9 +26,9 @@ ghc --version cabal v2-update cabal v2-clean -cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '+RTS -A256m -RTS -split-sections -optc-Os -optl=-pthread' pandoc -cabal v2-build -j -cabal v2-test -j +cabal v2-configure --enable-tests -f-export-dynamic -fembed_data_files --enable-executable-static --ghc-options '-j4 +RTS -A256m -RTS -split-sections -optc-Os -optl=-pthread' pandoc +cabal v2-build -j4 +cabal v2-test -j4 for f in $(find dist-newstyle -name 'pandoc' -type f -perm /400); do cp $f /artifacts/; done # make deb -- cgit v1.2.3