|
| 1 | +--- |
| 2 | +name: libnvdimm/for-next |
| 3 | + |
| 4 | +# yamllint disable-line rule:truthy |
| 5 | +on: |
| 6 | + schedule: |
| 7 | + - cron: '0 6 * * *' # 10 pm PST (UTC-8) |
| 8 | + workflow_dispatch: |
| 9 | + |
| 10 | +run-name: "libnvdimm/for-next (${{ github.event_name }})" |
| 11 | + |
| 12 | +jobs: |
| 13 | + check: |
| 14 | + runs-on: ubuntu-latest |
| 15 | + outputs: |
| 16 | + changed: ${{ steps.changed.outputs.value }} |
| 17 | + sha: ${{ steps.sha.outputs.value }} |
| 18 | + steps: |
| 19 | + - name: fetch kernel HEAD |
| 20 | + id: sha |
| 21 | + run: | |
| 22 | + sha=$(git ls-remote \ |
| 23 | + https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git \ |
| 24 | + refs/heads/libnvdimm-for-next | awk '{print $1}') |
| 25 | + echo "value=$sha" >> "$GITHUB_OUTPUT" |
| 26 | +
|
| 27 | + - name: check if already tested |
| 28 | + id: cache |
| 29 | + uses: actions/cache/restore@v4 |
| 30 | + with: |
| 31 | + path: /tmp/.ndctl-tested |
| 32 | + key: tested-nvdimm-for-next-${{ steps.sha.outputs.value }} |
| 33 | + lookup-only: true |
| 34 | + |
| 35 | + - name: set changed output |
| 36 | + id: changed |
| 37 | + run: | |
| 38 | + if [[ "${{ steps.cache.outputs.cache-hit }}" == "true" ]]; then |
| 39 | + echo "value=false" >> "$GITHUB_OUTPUT" |
| 40 | + echo "nvdimm/for-next unchanged (SHA: ${{ steps.sha.outputs.value }}) — skipping" |
| 41 | + else |
| 42 | + echo "value=true" >> "$GITHUB_OUTPUT" |
| 43 | + echo "nvdimm/for-next new SHA: ${{ steps.sha.outputs.value }} — running" |
| 44 | + fi |
| 45 | +
|
| 46 | + test: |
| 47 | + needs: check |
| 48 | + if: needs.check.outputs.changed == 'true' |
| 49 | + uses: ./.github/workflows/main.yml |
| 50 | + with: |
| 51 | + kernel_repo: "https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git" |
| 52 | + kernel_branch: "libnvdimm-for-next" |
| 53 | + ndctl_repo: "pmem/ndctl" |
| 54 | + ndctl_branch: "pending" |
| 55 | + test_suite: "nvdimm dax" |
| 56 | + timeout_min: "35" |
| 57 | + |
| 58 | + mark: |
| 59 | + needs: [check, test] |
| 60 | + if: needs.test.result == 'success' |
| 61 | + runs-on: ubuntu-latest |
| 62 | + steps: |
| 63 | + - run: echo "${{ needs.check.outputs.sha }}" > /tmp/.ndctl-tested |
| 64 | + - uses: actions/cache/save@v4 |
| 65 | + with: |
| 66 | + path: /tmp/.ndctl-tested |
| 67 | + key: tested-nvdimm-for-next-${{ needs.check.outputs.sha }} |
0 commit comments