ci.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: CI
  2. on:
  3. push:
  4. branches: [ "master" ]
  5. pull_request:
  6. branches: [ "master" ]
  7. schedule:
  8. - cron: "0 12 * * 1" # Every Monday at 12:00 UTC
  9. jobs:
  10. rustfmt:
  11. name: Rustfmt
  12. runs-on: ubuntu-latest
  13. steps:
  14. - uses: actions/checkout@master
  15. - name: Install Rust
  16. run: rustup update stable && rustup default stable && rustup component add rustfmt
  17. - run: cargo fmt --all --check
  18. ci:
  19. name: CI
  20. runs-on: ubuntu-latest
  21. steps:
  22. - name: Checkout the source code
  23. uses: actions/checkout@v2
  24. with:
  25. fetch-depth: 1
  26. - name: Test and build
  27. shell: bash -ileo pipefail {0}
  28. run: |
  29. apt-get update -y
  30. DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends g++ curl ca-certificates libc6-dev make libssl-dev pkg-config git cmake zlib1g-dev
  31. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable --profile minimal -y
  32. cargo test --release --all
  33. cargo build --release