The CLI frontend to a gist server written in Rust
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

.build.yml 1.5KB

123456789101112131415161718192021222324252627282930313233
  1. image: archlinux
  2. packages:
  3. - rustup
  4. - rsync
  5. - clang
  6. - wget
  7. sources:
  8. - https://git.sr.ht/~simulacrumparty/bnglws-client
  9. secrets:
  10. - 61fdfc2d-f964-49ef-8bc6-e7a7286a1270
  11. - 808ed4b8-9e8c-4ec1-9366-582961709fbc
  12. tasks:
  13. - setup: |
  14. rustup default nightly
  15. rustup target add x86_64-apple-darwin
  16. mkdir bnglws-client/.cargo
  17. echo -e '[target.x86_64-apple-darwin]\nlinker = "x86_64-apple-darwin14-clang"\nar = "x86_64-apple-darwin14-ar"' > bnglws-client/.cargo/config
  18. git clone https://github.com/tpoechtrager/osxcross
  19. wget -nc https://s3.dockerproject.org/darwin/v2/MacOSX10.10.sdk.tar.xz
  20. mv MacOSX10.10.sdk.tar.xz osxcross/tarballs/
  21. UNATTENDED=yes OSX_VERSION_MIN=10.7 ./osxcross/build.sh
  22. - build: |
  23. cd bnglws-client
  24. cargo build --target x86_64-unknown-linux-gnu --release
  25. PATH="$(pwd)/../osxcross/target/bin:$PATH" cargo build --target x86_64-apple-darwin --release
  26. - deploy: |
  27. cd bnglws-client
  28. tar -czvf x86_64-apple-darwin.tar.gz target/x86_64-apple-darwin/release/bngl
  29. tar -czvf x86_64-unknown-linux-gnu.tar.gz target/x86_64-unknown-linux-gnu/release/bngl
  30. ssh_target=$(cat /home/build/.ssh_target)
  31. sshopts="ssh -o StrictHostKeyChecking=no"
  32. rsync --rsh="$sshopts" -rP x86_64-apple-darwin.tar.gz $ssh_target:/var/www/bnglws/static/releases/x86_64-apple-darwin.tar.gz
  33. rsync --rsh="$sshopts" -rP x86_64-unknown-linux-gnu.tar.gz $ssh_target:/var/www/bnglws/static/releases/x86_64-unknown-linux-gnu.tar.gz