aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2023-03-12 17:09:17 -0700
committerJohn MacFarlane <[email protected]>2023-03-12 17:09:17 -0700
commite6d4af1a674a5586cac484a94b2a40e76e5a3eb9 (patch)
tree4f5396ccca5f7807a8d80418db35438a1879a2ca
parent3626724817e0d97e376d11c3f005ebdb8ea191f7 (diff)
Cirrus: more build improvements.
Name artifact directories with the architecture type.
-rw-r--r--.cirrus.yml31
-rw-r--r--linux/make_artifacts.sh10
-rw-r--r--macos/make_macos_release.sh12
3 files changed, 39 insertions, 14 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index c3fc40966..4766c64f6 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -9,7 +9,7 @@ task:
- brew install ghc cabal-install
cabal_store_cache:
folder: ~/.cabal/store
- fingerprint_key: macos_2023_03_11
+ fingerprint_key: macos_2023_03_12
deps_script:
- cabal update
- cabal build all -fembed_data_files -fserver -flua --dependencies-only
@@ -17,9 +17,8 @@ task:
- cabal_store
install_script: |
sh macos/make_macos_release.sh
- zip -r macos-release-candidate.zip macos-release-candidate
artifacts:
- path: macos-release-candidate.zip
+ path: macos-arm64/**
task:
name: linux_arm64
@@ -43,4 +42,28 @@ task:
package_script:
- bash linux/make_artifacts.sh
release_candidate_artifacts:
- path: ./linux/artifacts/*
+ path: ./linux-arm64/*
+
+task:
+ name: linux_amd64
+ trigger_type: manual
+ timeout_in: 90m
+ container:
+ image: registry.gitlab.b-data.ch/ghc/ghc4pandoc:9.4.4
+ cpu: 4
+ memory: 12G
+ env:
+ CABALOPTS: -f-export-dynamic -fembed_data_files -fserver -flua --enable-executable-static -j4
+ GHCOPTS: -j4 +RTS -A256m -RTS -split-sections -optc-Os -optl=-pthread
+ cabal_store_cache:
+ folder: ~/.cabal/store
+ fingerprint_key: linux_amd64_2023_03_12
+ deps_script:
+ - cabal update
+ - cabal build --dependencies-only $CABALOPTS --ghc-options="$GHCOPTS" pandoc-cli
+ upload_caches:
+ - cabal_store
+ package_script:
+ - bash linux/make_artifacts.sh
+ release_candidate_artifacts:
+ path: ./linux-amd64/*
diff --git a/linux/make_artifacts.sh b/linux/make_artifacts.sh
index e10d5b907..6d3c48954 100644
--- a/linux/make_artifacts.sh
+++ b/linux/make_artifacts.sh
@@ -17,18 +17,10 @@ case "$MACHINE" in
*) ARCHITECTURE=unknown;;
esac
-ARTIFACTS="$WORK/linux/artifacts"
+ARTIFACTS="$WORK/linux-${ARCHITECTURE}"
echo "Creating $ARTIFACTS directory"
mkdir -p $ARTIFACTS
-# This is our sentinel that tells us when we're done.
-rm -f $ARTIFACTS/DONE
-
-clean_up() {
- echo "Exiting with error..."
-}
-trap clean_up EXIT
-
echo "Copying and stripping pandoc binary"
cp "$BINPATH" "$ARTIFACTS/pandoc"
strip "$ARTIFACTS/pandoc"
diff --git a/macos/make_macos_release.sh b/macos/make_macos_release.sh
index cf5d6137b..6eb5fd440 100644
--- a/macos/make_macos_release.sh
+++ b/macos/make_macos_release.sh
@@ -1,7 +1,17 @@
#!/bin/sh -e
+MACHINE=$(uname -m)
+case "$MACHINE" in
+ x86_64) ARCHITECTURE=amd64;;
+ i686) ARCHITECTURE=i386;;
+ i386) ARCHITECTURE=i386;;
+ aarch64) ARCHITECTURE=arm64;;
+ armv6l | armv7l) ARCHITECTURE=armhf;;
+ *) ARCHITECTURE=unknown;;
+esac
+
VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $2;}')
-ARTIFACTS=macos-release-candidate
+ARTIFACTS=macos-$MACHINE
RESOURCES=$ARTIFACTS/Resources
ROOT=$ARTIFACTS/pandoc
DEST=$ROOT/usr/local