diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml new file mode 100644 index 0000000..fda6b95 --- /dev/null +++ b/.github/workflows/build-and-test.yaml @@ -0,0 +1,51 @@ +name: Build and Test +on: + workflow_call: + +jobs: + build: + name: Build and Test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + # - windows-latest + defaults: + run: + shell: bash + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Prepare runner + uses: ./.github/actions/prepare-runner + + - name: Install toolchain + uses: ./.github/actions/rust-toolchain + with: + components: llvm-tools-preview + + - name: Build + id: build + uses: ./.github/actions/cargo-build + + - name: Test + id: test + run: | + ls -la $VULKAN_SDK/lib + cargo test --verbose + + - name: Doctest + if: contains(fromJSON('["success", "failure"]'), steps.test.conclusion) + run: | + ls -la $VULKAN_SDK/lib + cargo test --doc --verbose + + - name: Coverage + uses: ./.github/actions/cargo-code-coverage + with: + output-file: ${{ matrix.os }}-codecov.json + minimum-requirement: 0.0 diff --git a/.github/workflows/bundle.yaml b/.github/workflows/bundle.yaml index 105af64..d5e8eec 100644 --- a/.github/workflows/bundle.yaml +++ b/.github/workflows/bundle.yaml @@ -1,9 +1,8 @@ name: Bundle Binaries on: - workflow_run: - workflows: [ build ] - types: - - completed + push: + branches: + - master workflow_dispatch: inputs: profile: diff --git a/.github/workflows/build.yaml b/.github/workflows/ci.yaml similarity index 79% rename from .github/workflows/build.yaml rename to .github/workflows/ci.yaml index 54a78a1..c18c732 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: Build +name: Continuous Integration on: push: branches: [master, feature/*] @@ -156,47 +156,4 @@ jobs: build: name: Build and Test - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest - - macos-latest - # - windows-latest - defaults: - run: - shell: bash - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Prepare runner - uses: ./.github/actions/prepare-runner - - - name: Install toolchain - uses: ./.github/actions/rust-toolchain - with: - components: llvm-tools-preview - - - name: Build - id: build - uses: ./.github/actions/cargo-build - - - name: Test - id: test - run: | - ls -la $VULKAN_SDK/lib - cargo test --verbose - - - name: Doctest - if: contains(fromJSON('["success", "failure"]'), steps.test.conclusion) - run: | - ls -la $VULKAN_SDK/lib - cargo test --doc --verbose - - - name: Coverage - uses: ./.github/actions/cargo-code-coverage - with: - output-file: ${{ matrix.os }}-codecov.json - minimum-requirement: 0.0 + uses: ./.github/workflows/build-and-test.yaml diff --git a/.github/workflows/close-pull-requests.yaml b/.github/workflows/community-pull-requests.yaml similarity index 100% rename from .github/workflows/close-pull-requests.yaml rename to .github/workflows/community-pull-requests.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/deploy-github-pages.yaml similarity index 100% rename from .github/workflows/docs.yaml rename to .github/workflows/deploy-github-pages.yaml diff --git a/.github/workflows/promote.yaml b/.github/workflows/deploy-master.yaml similarity index 97% rename from .github/workflows/promote.yaml rename to .github/workflows/deploy-master.yaml index c767db0..26a7845 100644 --- a/.github/workflows/promote.yaml +++ b/.github/workflows/deploy-master.yaml @@ -12,7 +12,7 @@ concurrency: jobs: verify-build: name: Verify build integrity - uses: ./.github/workflows/build.yaml + uses: ./.github/workflows/ci.yaml permissions: contents: read security-events: write @@ -20,7 +20,7 @@ jobs: verify-docs: name: Verify documentation - uses: ./.github/workflows/docs.yaml + uses: ./.github/workflows/deploy-github-pages.yaml permissions: contents: read pages: write diff --git a/.github/workflows/audit.yaml b/.github/workflows/scheduled-audit.yaml similarity index 89% rename from .github/workflows/audit.yaml rename to .github/workflows/scheduled-audit.yaml index b15a9b8..11ead5e 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/scheduled-audit.yaml @@ -1,7 +1,8 @@ -name: Audit +name: Weekly Audit on: - schedule: [cron: "0 0 * * 0"] - workflow_call: + schedule: + # Scheduled to run once per week + - cron: '0 0 * * 0' jobs: audit: @@ -40,10 +41,10 @@ jobs: id: variables run: echo "date=$(date +%F)" >> "${GITHUB_OUTPUT}" - - name: Create issue if none exist + - name: Create issue or comment uses: ./.github/actions/github-issue-or-comment with: - title: Cargo audit failed + title: ${{ github.workflow }} failed body: | ⚠️ The Audit workflow run on ${{ steps.variables.outputs.date }} failed! diff --git a/.github/workflows/nightly.yaml b/.github/workflows/scheduled-build.yaml similarity index 86% rename from .github/workflows/nightly.yaml rename to .github/workflows/scheduled-build.yaml index 5c1f3be..4807874 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/scheduled-build.yaml @@ -1,16 +1,17 @@ name: Nightly Build on: schedule: + # Scheduled to run at the same time every day - cron: '0 0 * * *' jobs: nightly-ci: - name: Nightly Integration + name: Build and Test permissions: contents: read security-events: write actions: read - uses: ./.github/workflows/build.yaml + uses: ./.github/workflows/build-and-test.yaml create-issue: name: Create Github Issue @@ -28,10 +29,10 @@ jobs: id: variables run: echo "date=$(date +%F)" >> "${GITHUB_OUTPUT}" - - name: Create issue if none exist + - name: Create issue or comment uses: ./.github/actions/github-issue-or-comment with: - title: Nightly CI failed + title: ${{ github.workflow }} failed body: | ⚠️ The nightly CI workflow run on ${{ steps.variables.outputs.date }} failed!