~nabijaczleweli/voreutils

ref: 8252842e7ff74305e5642881658959dc00307d44 voreutils/.builds/sid.yml -rw-r--r-- 1.9 KiB
8252842eнаб Add echo a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
image: debian/sid
secrets:
  - ddeb8ace-1c12-4ce9-b0e3-a6f2cd48c4ef  # voreutils SSH key
  - ae6210b1-b37d-4f6c-9828-3e83c3a684a4  # voreutils auth token
packages:
  - clang
  - llvm-dev
  - mandoc
  - curl
tasks:
  - build-gcc: |
      cd voreutils
      make
      make test
      make clean
  - build-clang: |
      cd voreutils
      CC=clang CXX=clang++ make
      CC=clang CXX=clang++ make test
      CC=clang CXX=clang++ make clean
  - push-manpages: |
      git -C voreutils/ worktree add ../voreutils-man man
      rm -rf voreutils-man/*
      MANDIR=../voreutils-man/ HTMLMANDIR=../voreutils-man/ make -C voreutils allpages
      cd voreutils-man/
      git add .
      git config user.email "nabijaczleweli/autouploader@nabijaczleweli.xyz"
      git config user.name "наб autouploader"
      git remote set-url origin 'git@git.sr.ht:~nabijaczleweli/voreutils'
      ssh-keyscan git.sr.ht > ~/.ssh/known_hosts
      git commit -m "Manpage update by job $JOB_ID" || exit 0
      while true; do
        git push && break
        for _ in $(seq 0 10); do
          sleep 3
          git fetch
          git rebase
          git push && break 2
        done
        echo "Couldn't push manpages!"
        exit 1
      done
  - upload-release: |
      tag="$(git -C voreutils describe --abbrev=0 --tags || echo HEAD~1)"
      [ "$(git -C voreutils rev-list -n1 "$tag")" = "$(git -C voreutils rev-list -n1 HEAD)" ] || exit 0
      mkdir "voreutils-$tag-man"
      mv voreutils-man/* "voreutils-$tag-man"
      tar -caf "voreutils-$tag-man.tbz2" "voreutils-$tag-man"
      sha256sum --tag *.tbz2
      set +x  # Avoid echoing the token
      for f in *.tbz2; do
        curl -H "Authorization: Bearer $(cat ~/.release-token)" \
             -XPOST                                             \
             -F "file=@$f"                                      \
            "https://git.sr.ht/api/repos/voreutils/artifacts/$tag"
        echo
      done