on: pull_request: types: [opened, synchronize, reopened, ready_for_review] push: branches: - develop - main paths-ignore: - 'docs/**' - 'config/**' - '.github/**' - '**.md' - '**.yml' - '.dockerignore' - 'docker/**' name: Continuous integration for developing env: RUST_TOOLCHAIN: nightly-2022-07-14 jobs: check: name: Check if: github.event.pull_request.draft == false runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v2 - uses: arduino/setup-protoc@v1 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: ${{ env.RUST_TOOLCHAIN }} override: true - name: Rust Cache uses: Swatinem/rust-cache@v2.0.0 - uses: actions-rs/cargo@v1 with: command: check args: --workspace --all-targets test: name: Test Suite if: github.event.pull_request.draft == false runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v2 - name: Cache LLVM and Clang id: cache-llvm uses: actions/cache@v3 with: path: ./llvm key: llvm - uses: arduino/setup-protoc@v1 - uses: KyleMayes/install-llvm-action@v1 with: version: "14.0" cached: ${{ steps.cache-llvm.outputs.cache-hit }} - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: ${{ env.RUST_TOOLCHAIN }} override: true - name: Rust Cache uses: Swatinem/rust-cache@v2.0.0 - name: Cleanup disk uses: curoky/cleanup-disk-action@v2.0 with: retain: 'rust,llvm' - uses: actions-rs/cargo@v1 with: command: test args: --workspace env: CARGO_BUILD_RUSTFLAGS: "-C link-arg=-fuse-ld=lld" RUST_BACKTRACE: 1 GT_S3_BUCKET: ${{ secrets.S3_BUCKET }} GT_S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} GT_S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} UNITTEST_LOG_DIR: "__unittest_logs" fmt: name: Rustfmt if: github.event.pull_request.draft == false runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v2 - uses: arduino/setup-protoc@v1 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: ${{ env.RUST_TOOLCHAIN }} override: true - name: Rust Cache uses: Swatinem/rust-cache@v2.0.0 - run: rustup component add rustfmt - uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check clippy: name: Clippy if: github.event.pull_request.draft == false runs-on: ubuntu-latest timeout-minutes: 60 steps: - uses: actions/checkout@v2 - uses: arduino/setup-protoc@v1 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: ${{ env.RUST_TOOLCHAIN }} override: true - name: Rust Cache uses: Swatinem/rust-cache@v2.0.0 - run: rustup component add clippy - uses: actions-rs/cargo@v1 with: command: clippy args: --workspace --all-targets -- -D warnings -D clippy::print_stdout -D clippy::print_stderr