From 94dc2a5336bbffa76c5d1836943229d59cb038fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sat, 14 May 2022 17:05:50 -0300 Subject: [PATCH 01/10] Add basic Cirrus CI M1 build --- .cirrus.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 000000000..c5b9849d7 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,17 @@ +macos_instance: + image: ghcr.io/cirruslabs/macos-monterey-xcode:latest + +task: + name: Build (macOS M1) + + install_dependencies_script: brew install automake libtool haskell-stack + install_secp256k1_script: .github/scripts/install-libsecp256k1.sh + install_libff_script: .github/scripts/install-libff.sh + install_ghc_script: stack --resolver=ghc-8.10.5 setup + + build_dependencies_script: stack build --compiler=ghc-8.10.5 --ghc-options="-Werror" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib --only-dependencies + build_echidna_script: stack install --compiler=ghc-8.10.5 --ghc-options="-Werror" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib + + build_release_script: .github/scripts/build-macos-release.sh + build_output_artifacts: + path: echidna-test.tar.gz \ No newline at end of file From 318a82b4c2a194815d9b7386272f41f0d53e78b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sat, 14 May 2022 18:35:41 -0300 Subject: [PATCH 02/10] cirrus-ci: Add 2h timeout and caches --- .cirrus.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index c5b9849d7..eb5883838 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,6 +3,19 @@ macos_instance: task: name: Build (macOS M1) + timeout_in: 120m + + local_cache: + folder: $HOME/.local + fingerprint_script: echo $CIRRUS_OS && shasum .github/scripts/* + + stack_cache: + folder: $HOME/.stack + fingerprint_script: echo $CIRRUS_OS + + cabal_cache: + folder: $HOME/.cabal + fingerprint_script: echo $CIRRUS_OS install_dependencies_script: brew install automake libtool haskell-stack install_secp256k1_script: .github/scripts/install-libsecp256k1.sh From 82b52f59ab940c901ee7acbdf879ce095bceb8d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sat, 14 May 2022 21:14:19 -0300 Subject: [PATCH 03/10] Enable parallelism --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index eb5883838..965582d32 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -22,8 +22,8 @@ task: install_libff_script: .github/scripts/install-libff.sh install_ghc_script: stack --resolver=ghc-8.10.5 setup - build_dependencies_script: stack build --compiler=ghc-8.10.5 --ghc-options="-Werror" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib --only-dependencies - build_echidna_script: stack install --compiler=ghc-8.10.5 --ghc-options="-Werror" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib + build_dependencies_script: stack build -j 4 --compiler=ghc-8.10.5 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib --only-dependencies + build_echidna_script: stack install -j 4 --compiler=ghc-8.10.5 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib build_release_script: .github/scripts/build-macos-release.sh build_output_artifacts: From 86353311999473f77ca3353c1841efa9d634139c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sat, 14 May 2022 23:31:44 -0300 Subject: [PATCH 04/10] Build with newer GHC --- .cirrus.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 965582d32..2c96d9079 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -20,11 +20,11 @@ task: install_dependencies_script: brew install automake libtool haskell-stack install_secp256k1_script: .github/scripts/install-libsecp256k1.sh install_libff_script: .github/scripts/install-libff.sh - install_ghc_script: stack --resolver=ghc-8.10.5 setup + install_ghc_script: stack --resolver=ghc-8.10.7 setup - build_dependencies_script: stack build -j 4 --compiler=ghc-8.10.5 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib --only-dependencies - build_echidna_script: stack install -j 4 --compiler=ghc-8.10.5 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib + build_dependencies_script: stack build -j 4 --compiler=ghc-8.10.7 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib --only-dependencies + build_echidna_script: stack install -j 4 --compiler=ghc-8.10.7 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib build_release_script: .github/scripts/build-macos-release.sh build_output_artifacts: - path: echidna-test.tar.gz \ No newline at end of file + path: echidna-test.tar.gz From 8562091b732a41088d797faf7decca7a06a7970b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sun, 15 May 2022 11:37:35 -0300 Subject: [PATCH 05/10] Add gmp --- .cirrus.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2c96d9079..32ea81d80 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -17,13 +17,13 @@ task: folder: $HOME/.cabal fingerprint_script: echo $CIRRUS_OS - install_dependencies_script: brew install automake libtool haskell-stack + install_dependencies_script: brew install automake libtool haskell-stack gmp install_secp256k1_script: .github/scripts/install-libsecp256k1.sh install_libff_script: .github/scripts/install-libff.sh install_ghc_script: stack --resolver=ghc-8.10.7 setup - build_dependencies_script: stack build -j 4 --compiler=ghc-8.10.7 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib --only-dependencies - build_echidna_script: stack install -j 4 --compiler=ghc-8.10.7 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-lib-dirs=$HOME/.local/lib + build_dependencies_script: stack build -j 4 --compiler=ghc-8.10.7 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib --only-dependencies + build_echidna_script: stack install -j 4 --compiler=ghc-8.10.7 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib build_release_script: .github/scripts/build-macos-release.sh build_output_artifacts: From b220d982c6e61754dccf988582f685e3f5f953fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sun, 15 May 2022 15:10:06 -0300 Subject: [PATCH 06/10] Prettify yaml --- .cirrus.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 32ea81d80..958845974 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,7 +3,7 @@ macos_instance: task: name: Build (macOS M1) - timeout_in: 120m + timeout_in: 60m local_cache: folder: $HOME/.local @@ -22,8 +22,15 @@ task: install_libff_script: .github/scripts/install-libff.sh install_ghc_script: stack --resolver=ghc-8.10.7 setup - build_dependencies_script: stack build -j 4 --compiler=ghc-8.10.7 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib --only-dependencies - build_echidna_script: stack install -j 4 --compiler=ghc-8.10.7 --ghc-options="-Werror -j" --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib + build_dependencies_script: > + stack build --compiler=ghc-8.10.7 --ghc-options="-Werror" + --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include + --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib + --only-dependencies + build_echidna_script: > + stack install --compiler=ghc-8.10.7 --ghc-options="-Werror" + --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include + --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib build_release_script: .github/scripts/build-macos-release.sh build_output_artifacts: From b73fc83dde6b04acf88fdb0d26d5c97af36eaa81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sun, 15 May 2022 15:16:54 -0300 Subject: [PATCH 07/10] Fix multiline --- .cirrus.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 958845974..22d14325f 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -23,13 +23,13 @@ task: install_ghc_script: stack --resolver=ghc-8.10.7 setup build_dependencies_script: > - stack build --compiler=ghc-8.10.7 --ghc-options="-Werror" - --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include - --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib + stack build --compiler=ghc-8.10.7 --ghc-options="-Werror" \ + --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include \ + --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib \ --only-dependencies build_echidna_script: > - stack install --compiler=ghc-8.10.7 --ghc-options="-Werror" - --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include + stack install --compiler=ghc-8.10.7 --ghc-options="-Werror" \ + --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include \ --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib build_release_script: .github/scripts/build-macos-release.sh From 9275ad2086595305465d265b68075bef5b1ab2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Sun, 15 May 2022 15:17:24 -0300 Subject: [PATCH 08/10] Remove unused cache --- .cirrus.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 22d14325f..15040bc83 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -13,10 +13,6 @@ task: folder: $HOME/.stack fingerprint_script: echo $CIRRUS_OS - cabal_cache: - folder: $HOME/.cabal - fingerprint_script: echo $CIRRUS_OS - install_dependencies_script: brew install automake libtool haskell-stack gmp install_secp256k1_script: .github/scripts/install-libsecp256k1.sh install_libff_script: .github/scripts/install-libff.sh From 7d5f6bb49f661afa187aa8ced4b1237282df8d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 3 Jan 2023 15:26:41 -0300 Subject: [PATCH 09/10] cirrus-ci: update stack resolver --- .cirrus.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 15040bc83..cf2ce8bca 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -16,15 +16,15 @@ task: install_dependencies_script: brew install automake libtool haskell-stack gmp install_secp256k1_script: .github/scripts/install-libsecp256k1.sh install_libff_script: .github/scripts/install-libff.sh - install_ghc_script: stack --resolver=ghc-8.10.7 setup + install_ghc_script: stack --resolver=lts-20.05 setup build_dependencies_script: > - stack build --compiler=ghc-8.10.7 --ghc-options="-Werror" \ + stack build --ghc-options="-Werror" \ --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include \ --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib \ --only-dependencies build_echidna_script: > - stack install --compiler=ghc-8.10.7 --ghc-options="-Werror" \ + stack install --ghc-options="-Werror" \ --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include \ --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib From 420cbf8e830fc0b547a89a4dfa5611d32dfb280d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 3 Jan 2023 15:57:15 -0300 Subject: [PATCH 10/10] cirrus-ci: upgrade hpack --- .cirrus.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index cf2ce8bca..9e0a89f98 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -13,18 +13,18 @@ task: folder: $HOME/.stack fingerprint_script: echo $CIRRUS_OS - install_dependencies_script: brew install automake libtool haskell-stack gmp + install_dependencies_script: brew install automake libtool haskell-stack hpack gmp install_secp256k1_script: .github/scripts/install-libsecp256k1.sh install_libff_script: .github/scripts/install-libff.sh - install_ghc_script: stack --resolver=lts-20.05 setup + install_ghc_script: stack --resolver=lts-20.05 --with-hpack hpack setup build_dependencies_script: > - stack build --ghc-options="-Werror" \ + stack build --with-hpack hpack --ghc-options="-Werror" \ --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include \ --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib \ --only-dependencies build_echidna_script: > - stack install --ghc-options="-Werror" \ + stack install --with-hpack hpack --ghc-options="-Werror" \ --extra-include-dirs=$HOME/.local/include --extra-include-dirs=/opt/homebrew/include \ --extra-lib-dirs=$HOME/.local/lib --extra-lib-dirs=/opt/homebrew/lib