Skip to content

Commit

Permalink
Refactor ci-spec.yml to reduce resource usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshowbarker committed Feb 18, 2024
1 parent f1f57b6 commit 4673795
Showing 1 changed file with 14 additions and 28 deletions.
42 changes: 14 additions & 28 deletions .github/workflows/ci-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ on:
workflow_dispatch:

jobs:
build-core-spec:
set-up-bikeshed:
runs-on: ubuntu-latest
steps:
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
set-up-environment:
runs-on: ubuntu-latest
needs: [set-up-bikeshed]
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand All @@ -24,12 +30,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Setup TexLive
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- name: Setup Sphinx
run: pip install six && pip install sphinx==5.1.0
build-core-spec:
runs-on: ubuntu-latest
needs: [set-up-environment]
steps:
- name: Build main spec
run: cd document/core && make main
- name: Run Bikeshed
Expand All @@ -42,12 +50,8 @@ jobs:

build-js-api-spec:
runs-on: ubuntu-latest
needs: [set-up-bikeshed]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Run Bikeshed
run: bikeshed spec "document/js-api/index.bs" "document/js-api/index.html"
- name: Upload artifact
uses: actions/upload-artifact@v2
Expand All @@ -57,11 +61,8 @@ jobs:

build-web-api-spec:
runs-on: ubuntu-latest
needs: [set-up-bikeshed]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Run Bikeshed
run: bikeshed spec "document/web-api/index.bs" "document/web-api/index.html"
- name: Upload artifact
Expand All @@ -74,8 +75,6 @@ jobs:
runs-on: ubuntu-latest
needs: [build-core-spec, build-js-api-spec, build-web-api-spec]
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Create output directory
run: mkdir _output && cp document/index.html _output/index.html
- name: Download core spec artifact
Expand All @@ -102,21 +101,8 @@ jobs:

publish-to-w3c-TR:
runs-on: ubuntu-latest
needs: [set-up-environment]
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: "recursive"
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Bikeshed
run: pip install bikeshed && bikeshed update
- name: Setup TexLive
run: sudo apt-get update -y && sudo apt-get install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- name: Setup Sphinx
run: pip install six && pip install sphinx==5.1.0
- name: Publish all specs to their https://www.w3.org/TR/ URLs
run: cd document && make -e WD-echidna-CI
env:
Expand Down

0 comments on commit 4673795

Please sign in to comment.