Skip to content

Commit

Permalink
Revert "ci: Use build-docker workflow as dependency for other workf…
Browse files Browse the repository at this point in the history
…lows"

This reverts commit 3ce3048.
  • Loading branch information
fischeti committed Sep 10, 2024
1 parent c48bc10 commit e78d17b
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 57 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/build-docker.yml

This file was deleted.

58 changes: 50 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,56 @@

# Run functional regression checks
name: ci
on:
workflow_run:
workflows: [build-docker]
types: [completed]
on: [push, pull_request]

jobs:

##########################
# Build Docker Container #
##########################

build-docker:
name: Deploy Docker image
runs-on: ubuntu-22.04
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
docker-images: false
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: GHCR Log-in
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max`
file: util/container/Dockerfile
push: true
tags: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}

########
# Docs #
########

docs:
name: Build documentation
runs-on: ubuntu-22.04
needs: build-docker
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
container:
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v2
- name: Build docs
Expand All @@ -33,9 +66,12 @@ jobs:
pytest:
name: Python unit tests
runs-on: ubuntu-22.04
needs: build-docker
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
container:
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v2
- name: Run pytest
Expand All @@ -48,9 +84,12 @@ jobs:
sw-snitch-cluster-vlt:
name: Simulate SW on Snitch Cluster w/ Verilator
runs-on: ubuntu-22.04
needs: build-docker
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
container:
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -96,9 +135,12 @@ jobs:
sw-snitch-cluster-banshee:
name: Simulate SW on Snitch Cluster w/ Banshee
runs-on: ubuntu-22.04
needs: build-docker
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
container:
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v2
with:
Expand Down
41 changes: 34 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

# Run all lint checks
name: lint
on:
workflow_run:
workflows: [build-docker]
types: [completed]
on: [push, pull_request]

jobs:

Expand All @@ -17,6 +14,9 @@ jobs:
verible-lint:
name: Lint Verilog sources
runs-on: ubuntu-latest
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v3
- uses: chipsalliance/verible-linter-action@main
Expand All @@ -35,6 +35,9 @@ jobs:
bender-vendor-up-to-date:
name: Check bender vendor up-to-date
runs-on: ubuntu-latest
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Check bender vendor up-to-date
uses: pulp-platform/pulp-actions/[email protected]
Expand All @@ -45,13 +48,22 @@ jobs:
sources-up-to-date:
name: Check Sources Up-to-Date
runs-on: ubuntu-22.04
container:
image: ghcr.io/pulp-platform/snitch_cluster:${{ github.ref_name }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install bender
uses: pulp-platform/pulp-actions/bender-install@v2
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install pip dependencies
run: |
pip install .
- name: Generate opcodes
run: |
./util/generate-opcodes.sh
Expand All @@ -70,6 +82,9 @@ jobs:
license-lint:
name: Check License headers
runs-on: ubuntu-latest
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Check License
uses: pulp-platform/pulp-actions/[email protected]
Expand All @@ -93,6 +108,9 @@ jobs:
yaml-lint:
name: Lint YAML Sources
runs-on: ubuntu-latest
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v3
- name: yaml-lint
Expand All @@ -105,6 +123,9 @@ jobs:
########################
python-lint:
runs-on: ubuntu-latest
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
name: Lint Python Sources
steps:
- name: Check out source repository
Expand All @@ -126,6 +147,9 @@ jobs:
clangfmt:
name: Lint C/C++ Sources
runs-on: ubuntu-latest
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v3
- uses: DoozyX/[email protected]
Expand All @@ -139,6 +163,9 @@ jobs:
editorconfig-lint:
name: Lint Editorconfig
runs-on: ubuntu-latest
if: >
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v3
- uses: editorconfig-checker/action-editorconfig-checker@main
Expand Down

0 comments on commit e78d17b

Please sign in to comment.