Recommend smbios #184
Workflow file for this run
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
--- | |
name: 'EBBR CI Build' | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
branches: '**' | |
tags: 'v*' | |
pull_request: | |
branches: main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# Make sure we fetch the tags for proper version identification. | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: 'Compute IRC message' | |
# We compute a message only for events happening in the main repository | |
# and only in the following cases: | |
# - Push of a tag or to the main branch | |
# - Pull request opened for the main branch of the main repository. | |
env: | |
PR_TITLE: ${{ github.event.pull_request.title }} | |
if: ${{ github.repository == 'ARM-software/ebbr' }} | |
run: | | |
case "${{ github.event_name }}" in | |
push) | |
case "${{ github.event.ref }}" in | |
refs/heads/main|refs/tags/*) | |
hash=$(git log -1 --pretty=format:%h) | |
title=$(git log -1 --pretty=format:%s) | |
msg="Push ${{ github.event.ref }} $hash (\"$title\")" | |
url="${{ github.event.head_commit.url }}" | |
;; | |
esac ;; | |
pull_request) | |
if [ "${{ github.event.action }}" == opened ] && | |
[ "${{ github.event.pull_request.base.ref }}" == main ]; then | |
msg="Pull request ${{ github.event.number }}" | |
msg="$msg (\"$PR_TITLE\")" | |
msg="$msg ${{ github.event.action }}" | |
url="${{ github.event.pull_request.html_url }}" | |
fi ;; | |
esac | |
echo "EBBR_IRC_MESSAGE=$msg" >> $GITHUB_ENV | |
echo "EBBR_IRC_URL=$url" >> $GITHUB_ENV | |
- name: 'Notify IRC' | |
uses: Gottox/irc-message-action@v2 | |
# We notify IRC only for the main repository | |
# and when we have computed a message. | |
if: ${{ github.repository == 'ARM-software/ebbr' && | |
env.EBBR_IRC_MESSAGE != '' }} | |
with: | |
server: irc.oftc.net | |
channel: '#ebbr' | |
nickname: ebbr-bot | |
message: |- | |
${{ env.EBBR_IRC_MESSAGE }} | |
${{ env.EBBR_IRC_URL }} | |
- name: 'Identify Version' | |
run: | | |
echo "EBBR_VERSION=$(git describe)" >> $GITHUB_ENV | |
- name: 'Install Debian required packages' | |
run: | | |
sudo apt update | |
sudo apt install python3-pip latexmk libalgorithm-diff-perl texlive \ | |
texlive-latex-extra texlive-humanities flake8 mypy yamllint | |
- name: 'Install Python required packages' | |
run: | | |
pip3 install --user mako | |
pip3 install --user typing | |
pip3 install --user Sphinx | |
- name: 'Check' | |
run: make check | |
- name: 'Build PDF' | |
run: | | |
make latexpdf | |
cp build/latex/ebbr.pdf build/ebbr-${{ env.EBBR_VERSION }}.pdf | |
- name: 'Build HTML' | |
run: make html | |
- name: 'Build Single HTML' | |
run: make singlehtml | |
- name: 'Build Text' | |
run: make text | |
- name: 'Upload artifacts' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ebbr-${{ env.EBBR_VERSION }} | |
path: | | |
build/ebbr-*.pdf | |
build/html/ | |
build/singlehtml/ | |
build/text/ | |
- name: 'Deploy to Github Pages' | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/singlehtml | |
- name: 'Publish Release' | |
uses: softprops/action-gh-release@v2 | |
if: endsWith(github.ref, env.EBBR_VERSION) | |
with: | |
files: build/ebbr-*.pdf | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |