Skip to content

Commit

Permalink
CI: synchronize with makefile
Browse files Browse the repository at this point in the history
This updates the ci.yml workflow to match the Makefile. Some jobs were
in different places in each file. This also adds a note that the CI
rules do not use the ci-runner* targets.
  • Loading branch information
bradjc committed Apr 2, 2024
1 parent 78224f5 commit e2fedbc
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 49 deletions.
63 changes: 35 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0 OR MIT
# Copyright Tock Contributors 2023.

# This workflow contains all tock-ci, seperated into jobs
# This workflow contains all tock-ci, separated into jobs

name: tock-ci
env:
Expand Down Expand Up @@ -34,10 +34,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: ci-job-format
- name: ci-job-format
run: make ci-job-format
- name: ci-markdown-toc
run: make ci-job-markdown-toc
- name: ci-job-markdown-toc
run: make ci-job-markdown-toc
- name: ci-job-readme-check
run: make ci-job-readme-check

ci-clippy:
strategy:
Expand All @@ -49,7 +51,7 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v3
- name: ci-job-clippy
- name: ci-job-clippy
run: make ci-job-clippy

ci-build:
Expand All @@ -60,16 +62,14 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: ci-job-syntax
run: make ci-job-syntax
- name: ci-job-compilation
run: make ci-job-compilation
- name: ci-job-debug-support-targets
run: make ci-job-debug-support-targets

- name: ci-job-collect-artifacts
run: make ci-job-collect-artifacts
- name: ci-job-syntax
run: make ci-job-syntax
- name: ci-job-compilation
run: make ci-job-compilation
- name: ci-job-debug-support-targets
run: make ci-job-debug-support-targets
- name: ci-job-collect-artifacts
run: make ci-job-collect-artifacts
- name: upload-build-artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -92,19 +92,26 @@ jobs:
sudo apt install libudev-dev libzmq3-dev
if: matrix.os == 'ubuntu-latest'
- uses: actions/checkout@v3
- name: ci-job-libraries
run: make ci-job-libraries
- name: ci-job-archs
run: make ci-job-archs
- name: ci-job-kernel
run: make ci-job-kernel
- name: ci-job-chips
run: make ci-job-chips
- name: ci-job-tools
run: make ci-job-tools
- name: ci-job-libraries
run: make ci-job-libraries
- name: ci-job-archs
run: make ci-job-archs
- name: ci-job-kernel
run: make ci-job-kernel
- name: ci-job-capsules
run: make ci-job-capsules
- name: ci-job-chips
run: make ci-job-chips
- name: ci-job-tools
run: make ci-job-tools
- name: ci-job-cargo-test-build
run: make ci-job-cargo-test-build

ci-qemu:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Update package repositories
Expand All @@ -115,5 +122,5 @@ jobs:
run: |
sudo apt install meson
- uses: actions/checkout@v3
- name: ci-job-qemu
run: make ci-job-qemu
- name: ci-job-qemu
run: make ci-job-qemu
51 changes: 30 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

################################################################################
##
## Interal support that needs to run first
## Internal support that needs to run first
##

# First, need to fill out some variables that the Makefile will use
Expand Down Expand Up @@ -274,12 +274,14 @@ ci: ci-help
## These each correspond to a 'status check' line in GitHub PR UX.
##
## These recipes *must not* contain rules, they simply collect jobs.

# n.b. This *replicates* configuration in the github workflow file
# to allow the GitHub UX to show these subtasks correctly
##
## NOTE: If you modify these, you must also modify the ci.yml CI workflow file
## in `.github/workflows`. This *replicates* configuration in the github
## workflow file to allow the GitHub UX to show these subtasks correctly.
.PHONY: ci-runner-github
ci-runner-github:\
ci-runner-github-format\
ci-runner-github-clippy\
ci-runner-github-build\
ci-runner-github-tests\
ci-runner-github-qemu
Expand All @@ -288,18 +290,21 @@ ci-runner-github:\
.PHONY: ci-runner-github-format
ci-runner-github-format:\
ci-job-format\
ci-job-clippy\
ci-job-markdown-toc\
ci-job-readme-check
$(call banner,CI-Runner: GitHub format runner DONE)

.PHONY: ci-runner-github-clippy
ci-runner-github-clippy:\
ci-job-clippy
$(call banner,CI-Runner: GitHub clippy runner DONE)

.PHONY: ci-runner-github-build
ci-runner-github-build:\
ci-job-syntax\
ci-job-compilation\
ci-job-debug-support-targets\
ci-job-collect-artifacts\
ci-job-cargo-test-build
ci-job-collect-artifacts
$(call banner,CI-Runner: GitHub build runner DONE)

.PHONY: ci-runner-github-tests
Expand All @@ -310,7 +315,8 @@ ci-runner-github-tests:\
ci-job-capsules\
ci-job-chips\
ci-job-tools\
ci-job-miri
ci-job-cargo-test-build\
ci-job-miri # EXPERIMENTAL
$(call banner,CI-Runner: GitHub tests runner DONE)

.PHONY: ci-runner-github-qemu
Expand Down Expand Up @@ -348,11 +354,6 @@ ci-job-format: licensecheck
$(call banner,CI-Job: Format Check)
@NOWARNINGS=true TOCK_FORMAT_MODE=diff $(MAKE) format

.PHONY: ci-job-clippy
ci-job-clippy:
$(call banner,CI-Job: Clippy)
@NOWARNINGS=true ./tools/run_clippy.sh

define ci_setup_markdown_toc
$(call banner,CI-Setup: Install markdown-toc)
npm install markdown-toc
Expand Down Expand Up @@ -388,6 +389,14 @@ ci-job-readme-check:



### ci-runner-github-clippy jobs:
.PHONY: ci-job-clippy
ci-job-clippy:
$(call banner,CI-Job: Clippy)
@NOWARNINGS=true ./tools/run_clippy.sh



### ci-runner-github-build jobs:
.PHONY: ci-job-syntax
ci-job-syntax:
Expand Down Expand Up @@ -524,8 +533,9 @@ ci-job-cargo-test-build:
@$(MAKE) NO_RUN="--no-run" -C "boards/opentitan/earlgrey-cw310" test
@$(MAKE) NO_RUN="--no-run" -C "boards/esp32-c3-devkitM-1" test

### ci-runner-github-qemu jobs:


### ci-runner-github-qemu jobs:
QEMU_COMMIT_HASH=1600b9f46b1bd08b00fe86c46ef6dbb48cbe10d6
define ci_setup_qemu_riscv
$(call banner,CI-Setup: Build QEMU)
Expand All @@ -547,8 +557,6 @@ ci-setup-qemu:
CI_JOB_QEMU_RISCV)
$(if $(CI_JOB_QEMU_RISCV),$(eval CI_JOB_QEMU := true))



define ci_job_qemu
$(call banner,CI-Job: QEMU)
@cd tools/qemu-runner;\
Expand All @@ -563,10 +571,6 @@ endef
ci-job-qemu: ci-setup-qemu
$(if $(CI_JOB_QEMU),$(call ci_job_qemu))

.PHONY: board-release-test
board-release-test:
@cd tools/board-runner;\
cargo run ${TARGET}


### ci-runner-netlify jobs:
Expand All @@ -577,4 +581,9 @@ ci-job-rustdoc:

## End CI rules
##
###################################################################
################################################################################

.PHONY: board-release-test
board-release-test:
@cd tools/board-runner;\
cargo run ${TARGET}

0 comments on commit e2fedbc

Please sign in to comment.