From 8606b4149fb3c28967d118b79112280690ef4e70 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 11 Jan 2022 10:48:03 -0500 Subject: [PATCH] Guix for CI now --- .builds/debian-stable.yml | 37 ------------------------------------- .builds/guix.yml | 30 ++++++++++++++++++++++++++++++ .builds/ubuntu-lts.yml | 33 --------------------------------- guix.scm | 4 ++-- 4 files changed, 32 insertions(+), 72 deletions(-) delete mode 100644 .builds/debian-stable.yml create mode 100644 .builds/guix.yml delete mode 100644 .builds/ubuntu-lts.yml diff --git a/.builds/debian-stable.yml b/.builds/debian-stable.yml deleted file mode 100644 index 78a573b..0000000 --- a/.builds/debian-stable.yml +++ /dev/null @@ -1,37 +0,0 @@ -image: debian/buster -sources: -- https://git.sr.ht/~singpolyma/cheogram -- https://git.sr.ht/~singpolyma/jingle-xmpp -- https://github.com/int-e/hstatsd#6415e484a2680eef41a8986dc3197b6dae377ba4 -packages: -- ghc -- cabal-install -- c2hs -- pkg-config -- libgnutls28-dev -- libgsasl7-dev -- libpcre3-dev -- libssl-dev -- libtokyocabinet-dev -- libxml2-dev -- zlib1g-dev -- hlint -environment: - LANG: C.UTF-8 -artifacts: -- cheogram/dist/build/cheogram/cheogram -tasks: -- cabal_update: | - cabal update -- dependencies: | - cd jingle-xmpp - cabal install --constraint="random <= 1.1" --constraint="attoparsec < 0.14" --constraint="memory < 0.16" --constraint="transformers-compat < 0.7" --constraint="aeson < 1.6" --constraint="hashable < 1.4" - cd .. - cd hstatsd - cabal install - cd .. - cd cheogram - cabal install --enable-tests --only-dependencies -- test: | - cd cheogram - make diff --git a/.builds/guix.yml b/.builds/guix.yml new file mode 100644 index 0000000..35dce11 --- /dev/null +++ b/.builds/guix.yml @@ -0,0 +1,30 @@ +image: guix +packages: +- plzip +sources: +- https://git.sr.ht/~singpolyma/cheogram +secrets: +- 9ded4157-4cf9-42ae-b7d0-55eb6e52ea37 +- fd52c9ce-04e8-4684-af6c-1ab78d2e124a +artifacts: +- cheogram.scm +- cheogram.nar.lz +tasks: +- bake: | + printf "(define-module (cheogram))\n" >> cheogram.scm + sed '/^;;;;$/q' cheogram/guix.scm >> cheogram.scm + printf "(define-public cheogram\n\t" >> cheogram.scm + cd cheogram + printf '(load "%s/guix.scm")\n(write cheogram-baked)\n' "$(pwd)" | guix repl /dev/stdin >> ../cheogram.scm + cd - + printf ")\n" >> cheogram.scm + rm -rf cheogram +- build: | + guix build --no-grafts -L. cheogram +- archive: | + sudo mv signing-key.pub /etc/guix/ + sudo mv signing-key.sec /etc/guix/ + sudo chown root:root /etc/guix/signing-key.sec + sudo chmod 0400 /etc/guix/signing-key.sec + guix archive --export -r --no-grafts -L. cheogram > cheogram.nar + plzip cheogram.nar diff --git a/.builds/ubuntu-lts.yml b/.builds/ubuntu-lts.yml deleted file mode 100644 index 7d5e48e..0000000 --- a/.builds/ubuntu-lts.yml +++ /dev/null @@ -1,33 +0,0 @@ -image: ubuntu/lts -sources: -- https://git.sr.ht/~singpolyma/cheogram -- https://git.sr.ht/~singpolyma/jingle-xmpp -packages: -- ghc -- cabal-install -- c2hs -- pkg-config -- libgnutls28-dev -- libgsasl7-dev -- libpcre3-dev -- libssl-dev -- libtokyocabinet-dev -- libxml2-dev -- zlib1g-dev -- hlint -environment: - LANG: C.UTF-8 -artifacts: -- cheogram/dist/build/cheogram/cheogram -tasks: -- cabal_update: | - cabal update -- dependencies: | - cd jingle-xmpp - cabal install --constraint="random <= 1.1" --constraint="attoparsec < 0.14" --constraint="memory < 0.16" --constraint="transformers-compat < 0.7" --constraint="hashable < 1.4" - cd .. - cd cheogram - cabal install --enable-tests --only-dependencies -- test: | - cd cheogram - make diff --git a/guix.scm b/guix.scm index e201f10..22865ee 100644 --- a/guix.scm +++ b/guix.scm @@ -648,7 +648,7 @@ (sha256 (base32 ,(read-line (open-pipe* OPEN_READ "guix" "hash" "-rx" %source-dir)))))) - (build-system haskell-build-system) + (build-system 'haskell-build-system) (inputs '(list dhall @@ -684,7 +684,7 @@ (home-page "https://git.singpolyma.net/cheogram") (synopsis "") (description "") - (license license:agpl3))) + (license 'license:agpl3))) ; Baked version of jmp-pay-template with leaves eval'd (define-public cheogram-baked -- 2.34.7