Skip to content

Commit

Permalink
add yaml related pre-commit hooks
Browse files Browse the repository at this point in the history
relates to #260
  • Loading branch information
kbroch-rivosinc committed Dec 10, 2024
1 parent f91ce90 commit c0195b9
Show file tree
Hide file tree
Showing 1,504 changed files with 13,824 additions and 15,802 deletions.
4 changes: 1 addition & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,5 @@
]
}
},
"forwardPorts": [
8000, 8080
]
"forwardPorts": [8000, 8080]
}
52 changes: 26 additions & 26 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Regression test

on:
schedule:
- cron: '30 2 * * *'
- cron: "30 2 * * *"
workflow_dispatch:

jobs:
Expand All @@ -27,28 +27,28 @@ jobs:
if: ${{ needs.check_date.outputs.should_run != 'false' }}
runs-on: ubuntu-latest
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v3
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v3
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Setup project
run: ./bin/setup
- name: Run regression
run: ./do test:nightly
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v3
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v3
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Setup project
run: ./bin/setup
- name: Run regression
run: ./do test:nightly
142 changes: 71 additions & 71 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy pages
on:
push:
branches:
- main
- main
workflow_dispatch:
permissions:
contents: read
Expand All @@ -18,73 +18,73 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v3
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v3
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Setup project
run: ./bin/setup
- name: Build manual
run: ./do gen:html_manual MANUAL_NAME=isa VERSIONS=all
- name: Build html documentation for generic_rv64
run: ./do gen:html[generic_rv64]
- name: Generate YARD docs
run: ./do gen:tool_doc
- name: Create _site/example_cfg
run: mkdir -p _site/example_cfg
- name: Create _site/manual
run: mkdir -p _site/manual
- name: Create _site/pdfs
run: mkdir -p _site/pdfs
- name: Create _site/htmls
run: mkdir -p _site/htmls
- name: Copy cfg html
run: cp -R gen/cfg_html_doc/generic_rv64/html _site/example_cfg
- name: Create RVA20 Profile Release PDF Spec
run: ./do gen:profile[RVA20]
- name: Copy RVA20 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA20.pdf _site/pdfs/RVA20.pdf
- name: Create RVA22 Profile Release PDF Spec
run: ./do gen:profile[RVA22]
- name: Copy RVA22 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA22.pdf _site/pdfs/RVA22.pdf
- name: Create RVI20 Profile Release PDF Spec
run: ./do gen:profile[RVI20]
- name: Copy RVI20 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA20.pdf _site/pdfs/RVI20.pdf
- name: Create MC100 PDF Spec
run: ./do gen:cert_model_pdf[MC100]
- name: Copy MC100 PDF
run: cp gen/certificate_doc/pdf/MC100.pdf _site/pdfs/MC100.pdf
- name: Create MC100 HTML Spec
run: ./do gen:cert_model_html[MC100]
- name: Copy MC100 HTML
run: cp gen/certificate_doc/html/MC100.html _site/htmls/MC100.html
- name: Copy manual html
run: cp -R gen/manual/isa/top/all/html _site/manual
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v3
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v3
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Setup project
run: ./bin/setup
- name: Build manual
run: ./do gen:html_manual MANUAL_NAME=isa VERSIONS=all
- name: Build html documentation for generic_rv64
run: ./do gen:html[generic_rv64]
- name: Generate YARD docs
run: ./do gen:tool_doc
- name: Create _site/example_cfg
run: mkdir -p _site/example_cfg
- name: Create _site/manual
run: mkdir -p _site/manual
- name: Create _site/pdfs
run: mkdir -p _site/pdfs
- name: Create _site/htmls
run: mkdir -p _site/htmls
- name: Copy cfg html
run: cp -R gen/cfg_html_doc/generic_rv64/html _site/example_cfg
- name: Create RVA20 Profile Release PDF Spec
run: ./do gen:profile[RVA20]
- name: Copy RVA20 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA20.pdf _site/pdfs/RVA20.pdf
- name: Create RVA22 Profile Release PDF Spec
run: ./do gen:profile[RVA22]
- name: Copy RVA22 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA22.pdf _site/pdfs/RVA22.pdf
- name: Create RVI20 Profile Release PDF Spec
run: ./do gen:profile[RVI20]
- name: Copy RVI20 Profile Release PDF
run: cp gen/profile_doc/pdf/RVA20.pdf _site/pdfs/RVI20.pdf
- name: Create MC100 PDF Spec
run: ./do gen:cert_model_pdf[MC100]
- name: Copy MC100 PDF
run: cp gen/certificate_doc/pdf/MC100.pdf _site/pdfs/MC100.pdf
- name: Create MC100 HTML Spec
run: ./do gen:cert_model_html[MC100]
- name: Copy MC100 HTML
run: cp gen/certificate_doc/html/MC100.html _site/htmls/MC100.html
- name: Copy manual html
run: cp -R gen/manual/isa/top/all/html _site/manual
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "_site"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
120 changes: 3 additions & 117 deletions .github/workflows/regress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Regression test
on:
pull_request:
branches:
- main
- main
workflow_dispatch:
jobs:
regress-smoke:
Expand Down Expand Up @@ -31,119 +31,5 @@ jobs:
run: ./bin/build_container
- name: Setup project
run: ./bin/setup
- name: Run smoke
run: ./do test:smoke
regress-gen-isa-manual:
runs-on: ubuntu-latest
needs: regress-smoke
env:
MANUAL_NAME: isa
VERSIONS: all
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v3
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v3
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Generate HTML ISA manual
run: ./do gen:html_manual
regress-gen-ext-pdf:
runs-on: ubuntu-latest
needs: regress-smoke
env:
EXT: B
VERSION: latest
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v3
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v3
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Generate extension PDF
run: ./do gen:ext_pdf
regress-gen-certificate:
runs-on: ubuntu-latest
needs: regress-smoke
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v3
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v3
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Generate extension PDF
run: ./do gen:cert_model_pdf[MockCertificateModel]
regress-gen-profile:
runs-on: ubuntu-latest
needs: regress-smoke
steps:
- name: Clone Github Repo Action
uses: actions/checkout@v4
- name: Setup apptainer
uses: eWaterCycle/[email protected]
- name: Get container from cache
id: cache-sif
uses: actions/cache@v3
with:
path: .singularity/image.sif
key: ${{ hashFiles('container.def', 'bin/.container-tag') }}
- name: Get gems and node files from cache
id: cache-bundle-npm
uses: actions/cache@v3
with:
path: |
.home/.gems
node_modules
key: ${{ hashFiles('Gemfile.lock') }}-${{ hashFiles('package-lock.json') }}
- if: ${{ steps.cache-sif.outputs.cache-hit != 'true' }}
name: Build container
run: ./bin/build_container
- name: Generate extension PDF
run: ./do gen:profile[MockProfileRelease]
- name: Run regression
run: ./do regress
Loading

0 comments on commit c0195b9

Please sign in to comment.