1name: Standard Check 2 3on: [push, pull_request] 4 5jobs: 6 # ensure the toolchain is cached 7 ensure-toolchain: 8 uses: ./.github/workflows/cache-toolchain.yml 9 10 fmt: 11 name: fmt check 12 runs-on: ubuntu-latest 13 needs: [ensure-toolchain] 14 steps: 15 - uses: actions/checkout@v3 16 - name: Cache build tools 17 id: cache-build-tools 18 uses: actions/cache@v3 19 env: 20 cache-name: cache-build-tools 21 dadk_version: 0.1.2 22 with: 23 path: | 24 ~/.cargo 25 ~/.rustup 26 ~/.bashrc 27 key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.dadk_version }}-${{ hashFiles('.github/workflows/cache-toolchain.yml') }} 28 29 - name: Check format 30 run: | 31 make fmt-check 32 33 build: 34 name: build check 35 runs-on: ubuntu-latest 36 needs: [ensure-toolchain] 37 steps: 38 - uses: actions/checkout@v3 39 - name: Cache build tools 40 id: cache-build-tools 41 uses: actions/cache@v3 42 env: 43 cache-name: cache-build-tools 44 dadk_version: 0.1.2 45 with: 46 path: | 47 ~/.cargo 48 ~/.rustup 49 ~/.bashrc 50 key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.dadk_version }}-${{ hashFiles('.github/workflows/cache-toolchain.yml') }} 51 52 - name: Build check 53 run: | 54 make build-release -j $(nproc) 55