-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the build process to build using the base container image
and remove the necessity to handle the dependencies during the build time Signed-off-by: Rafael Sene <[email protected]>
- Loading branch information
Showing
23 changed files
with
233 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,38 @@ | ||
# This workflow installs dependencies for PDF generation, generates the PDF, | ||
# and uploads the PDF as an artifact. | ||
|
||
name: Build RISC-V-Trace-Connectors.pdf | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
APT_PACKAGES_FILE: ${{ github.workspace }}/dependencies/apt_packages.txt | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/dependencies/Gemfile | ||
BUNDLE_BIN: ${{ github.workspace }}/bin | ||
NPM_PACKAGE_FOLDER: ${{ github.workspace }}/dependencies | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
- name: Install Ubuntu packages | ||
run: | | ||
sudo apt-get update | ||
grep -vE '^#' ${APT_PACKAGES_FILE} | xargs sudo apt-get install --yes --no-install-recommends | ||
# Ruby for asciidoctor | ||
- name: Setup Ruby and Gemfile content | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2.0" | ||
bundler-cache: true | ||
# Node.js for wavedrom | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install Node.js dependencies | ||
run: npm install ${NPM_PACKAGE_FOLDER} | ||
- name: Generate PDF | ||
run: | | ||
PATH=${PATH}:${BUNDLE_BIN}:$(npm bin):$(pwd) \ | ||
make -C docs/ RISC-V-Trace-Connectors.pdf | ||
- name: Archive PDF result | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: RISC-V-Trace-Connectors | ||
path: docs/RISC-V-Trace-Connectors.pdf | ||
retention-days: 7 | ||
# Step 1: Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
# Step 2: Pull the latest RISC-V Docs container image | ||
- name: Pull Container | ||
run: docker pull riscvintl/riscv-docs-base-container-image:latest | ||
|
||
# Step 3: Build Files | ||
- name: Build Files | ||
run: cd ./docs && make RISC-V-Trace-Connectors.pdf | ||
|
||
# Step 4: Upload the built PDF files as independent artifacts | ||
- name: Upload RISC-V-Trace-Control-Interface PDF | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: RISC-V-Trace-Control-Interface | ||
path: ${{ github.workspace }}/docs/RISC-V-Trace-Connectors.pdf | ||
retention-days: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,38 @@ | ||
# This workflow installs dependencies for PDF generation, generates the PDF, | ||
# and uploads the PDF as an artifact. | ||
|
||
name: Build RISC-V-Trace-Control-Interface.pdf | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
APT_PACKAGES_FILE: ${{ github.workspace }}/dependencies/apt_packages.txt | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/dependencies/Gemfile | ||
BUNDLE_BIN: ${{ github.workspace }}/bin | ||
NPM_PACKAGE_FOLDER: ${{ github.workspace }}/dependencies | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
- name: Install Ubuntu packages | ||
run: | | ||
sudo apt-get update | ||
grep -vE '^#' ${APT_PACKAGES_FILE} | xargs sudo apt-get install --yes --no-install-recommends | ||
# Ruby for asciidoctor | ||
- name: Setup Ruby and Gemfile content | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2.0" | ||
bundler-cache: true | ||
# Node.js for wavedrom | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install Node.js dependencies | ||
run: npm install ${NPM_PACKAGE_FOLDER} | ||
- name: Generate PDF | ||
run: | | ||
PATH=${PATH}:${BUNDLE_BIN}:$(npm bin):$(pwd) \ | ||
make -C docs/ RISC-V-Trace-Control-Interface.pdf | ||
- name: Archive PDF result | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: RISC-V-Trace-Control-Interface | ||
path: docs/RISC-V-Trace-Control-Interface.pdf | ||
retention-days: 7 | ||
# Step 1: Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
# Step 2: Pull the latest RISC-V Docs container image | ||
- name: Pull Container | ||
run: docker pull riscvintl/riscv-docs-base-container-image:latest | ||
|
||
# Step 3: Build Files | ||
- name: Build Files | ||
run: cd ./docs && make RISC-V-Trace-Control-Interface.pdf | ||
|
||
# Step 4: Upload the built PDF files as independent artifacts | ||
- name: Upload RISC-V-Trace-Control-Interface PDF | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: RISC-V-Trace-Control-Interface | ||
path: ${{ github.workspace }}/docs/RISC-V-Trace-Control-Interface.pdf | ||
retention-days: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,38 @@ | ||
# This workflow installs dependencies for PDF generation, generates the PDF, | ||
# and uploads the PDF as an artifact. | ||
|
||
name: Build RISC-V-N-Trace.pdf | ||
name: Build Build RISC-V-N-Trace.pdf | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
APT_PACKAGES_FILE: ${{ github.workspace }}/dependencies/apt_packages.txt | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/dependencies/Gemfile | ||
BUNDLE_BIN: ${{ github.workspace }}/bin | ||
NPM_PACKAGE_FOLDER: ${{ github.workspace }}/dependencies | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
- name: Install Ubuntu packages | ||
run: | | ||
sudo apt-get update | ||
grep -vE '^#' ${APT_PACKAGES_FILE} | xargs sudo apt-get install --yes --no-install-recommends | ||
# Ruby for asciidoctor | ||
- name: Setup Ruby and Gemfile content | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2.0" | ||
bundler-cache: true | ||
# Node.js for wavedrom | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install Node.js dependencies | ||
run: npm install ${NPM_PACKAGE_FOLDER} | ||
- name: Generate PDF | ||
run: | | ||
PATH=${PATH}:${BUNDLE_BIN}:$(npm bin):$(pwd) \ | ||
make -C docs/ RISC-V-N-Trace.pdf | ||
- name: Archive PDF result | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: RISC-V-N-Trace | ||
path: docs/RISC-V-N-Trace.pdf | ||
retention-days: 7 | ||
# Step 1: Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
|
||
# Step 2: Pull the latest RISC-V Docs container image | ||
- name: Pull Container | ||
run: docker pull riscvintl/riscv-docs-base-container-image:latest | ||
|
||
# Step 3: Build Files | ||
- name: Build Files | ||
run: cd ./docs && make RISC-V-N-Trace.pdf | ||
|
||
# Step 4: Upload the built PDF files as independent artifacts | ||
- name: Upload RISC-V-Trace-Control-Interface PDF | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: RISC-V-Trace-Control-Interface | ||
path: ${{ github.workspace }}/docs/RISC-V-N-Trace.pdf | ||
retention-days: 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,79 @@ | ||
# This workflow installs dependencies for PDF generation, generates the PDF, | ||
# and uploads the PDF as an artifact. | ||
|
||
name: Build ALL PDFs (listed below) | ||
name: Build All PDFs | ||
|
||
# The workflow is triggered by pull request, push to main, and manual dispatch. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
prerelease: | ||
description: 'Tag as a pre-release?' | ||
required: false | ||
type: boolean | ||
default: true | ||
draft: | ||
description: 'Create release as a draft?' | ||
required: false | ||
type: boolean | ||
default: false | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
APT_PACKAGES_FILE: ${{ github.workspace }}/dependencies/apt_packages.txt | ||
BUNDLE_GEMFILE: ${{ github.workspace }}/dependencies/Gemfile | ||
BUNDLE_BIN: ${{ github.workspace }}/bin | ||
NPM_PACKAGE_FOLDER: ${{ github.workspace }}/dependencies | ||
steps: | ||
# Step 1: Checkout the repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
- name: Install Ubuntu packages | ||
run: | | ||
sudo apt-get update | ||
grep -vE '^#' ${APT_PACKAGES_FILE} | xargs sudo apt-get install --yes --no-install-recommends | ||
# Ruby for asciidoctor | ||
- name: Setup Ruby and Gemfile content | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: "3.2.0" | ||
bundler-cache: true | ||
# Node.js for wavedrom | ||
- uses: actions/cache@v3 | ||
submodules: 'recursive' | ||
|
||
# Step 2: Pull the latest RISC-V Docs container image | ||
- name: Pull Container | ||
run: docker pull riscvintl/riscv-docs-base-container-image:latest | ||
|
||
# Step 3: Build Files | ||
- name: Build Files | ||
run: cd ./docs && make | ||
|
||
# Step 4: Upload the built PDF files as independent artifacts | ||
- name: Upload RISC-V-Trace-Control-Interface PDF | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
name: RISC-V-Trace-Control-Interface | ||
path: ${{ github.workspace }}/docs/RISC-V-Trace-Control-Interface.pdf | ||
retention-days: 30 | ||
|
||
- name: Upload RISC-V-Trace-Connectors PDF | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
node-version: '16' | ||
- name: Install Node.js dependencies | ||
run: npm install ${NPM_PACKAGE_FOLDER} | ||
- name: Generate PDF | ||
run: | | ||
PATH=${PATH}:${BUNDLE_BIN}:$(npm bin):$(pwd) \ | ||
make -C docs/ all | ||
- name: Archive PDF result | ||
name: RISC-V-Trace-Connectors | ||
path: ${{ github.workspace }}/docs/RISC-V-Trace-Connectors.pdf | ||
retention-days: 30 | ||
|
||
- name: Upload RISC-V-N-Trace PDF | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: AllPDFs.zip | ||
path: docs/*.pdf | ||
retention-days: 21 | ||
name: RISC-V-N-Trace | ||
path: ${{ github.workspace }}/docs/RISC-V-N-Trace.pdf | ||
retention-days: 30 | ||
|
||
- name: Get short SHA | ||
id: short-sha | ||
run: echo "SHORT_SHA=$(git rev-parse --short=4 HEAD)" >> $GITHUB_ENV | ||
|
||
# Step 5:Create Release | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ github.workspace }}/*.pdf | ||
tag_name: v${{ env.SHORT_SHA }} | ||
name: Release ${{ env.SHORT_SHA }} | ||
draft: ${{ github.event.inputs.draft }} | ||
prerelease: ${{ github.event.inputs.prerelease }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GHTOKEN }} | ||
if: github.event_name == 'workflow_dispatch' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.