K Framework Release 4420/merge #1328
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: 'Release' | |
run-name: K Framework Release ${{ github.ref_name }} | |
on: | |
pull_request: | |
types: [opened, edited, reopened, synchronize] | |
branches: | |
- 'develop' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ubuntu-jammy: | |
name: 'K Ubuntu Jammy Package' | |
runs-on: [self-hosted, linux, normal] | |
timeout-minutes: 90 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Build and Test Package' | |
uses: ./.github/actions/test-package | |
with: | |
os: ubuntu | |
distro: jammy | |
llvm: 15 | |
pkg-name: kframework_amd64_ubuntu_jammy.deb | |
build-package: package/debian/build-package jammy | |
test-package: package/debian/test-package | |
- name: 'Upload the package built to the Summary Page' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: kframework_amd64_ubuntu_jammy.deb | |
path: kframework_amd64_ubuntu_jammy.deb | |
if-no-files-found: error | |
retention-days: 1 | |
pyk-build-docs: | |
name: 'Build Pyk Documentation' | |
needs: ubuntu-jammy | |
runs-on: [self-hosted, linux, normal] | |
timeout-minutes: 10 | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
- name: 'Download K package from the Summary Page' | |
uses: actions/download-artifact@v4 | |
with: | |
name: kframework_amd64_ubuntu_jammy.deb | |
- name: 'Set up Docker' | |
uses: ./.github/actions/with-k-docker | |
with: | |
container-name: k-pyk-docs-${{ github.sha }} | |
k-deb-path: kframework_amd64_ubuntu_jammy.deb | |
- name: 'Build documentation in Docker container' | |
run: docker exec -u user k-pyk-docs-${{ github.sha }} make docs | |
- name: 'Copy documentation from Docker container' | |
run: docker cp k-pyk-docs-${{ github.sha }}:/home/user/docs/build pyk-docs | |
- name: 'Upload pyk documentation to the Summary Page' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pyk-docs.zip | |
path: pyk-docs | |
if-no-files-found: error | |
retention-days: 1 | |
- name: 'Tear down Docker' | |
if: always() | |
run: docker stop --time=0 k-pyk-docs-${{ github.sha }} | |
gh-pages: | |
name: 'GitHub Pages deployment' | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 30 | |
needs: [pyk-build-docs] | |
steps: | |
- name: 'Install pandoc/texlive/calibre' | |
run: | | |
sudo apt update --yes | |
sudo apt install --yes wget texlive-xetex libegl1 libopengl0 | |
sudo wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin version=6.29.0 | |
sudo wget https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-1-amd64.deb -O /tmp/pandoc.deb | |
sudo dpkg -i /tmp/pandoc.deb | |
- name: 'Checkout code and set up web build' | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
path: gh-pages | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
fetch-depth: 0 | |
- name: 'Checkout PL Tutorial code' | |
uses: actions/checkout@v4 | |
with: | |
repository: runtimeverification/pl-tutorial | |
path: gh-pages/k-distribution/pl-tutorial | |
token: ${{ secrets.JENKINS_GITHUB_PAT }} | |
- working-directory: gh-pages | |
run: | | |
git config --global user.name rv-jenkins | |
git config --global user.email [email protected] | |
git checkout --orphan gh-pages origin/master | |
- name: 'Build webpage' | |
working-directory: gh-pages | |
run: | | |
export PATH="$PATH":/opt/calibre | |
cd web | |
npm install | |
npm run build | |
npm run build-book | |
npm run build-sitemap | |
cd - | |
mv web/public_content ./ | |
rm -rf $(find . -maxdepth 1 -not -name public_content -a -not -name .git -a -not -path . -a -not -path .. -a -not -name CNAME) | |
mv public_content/* ./ | |
rm -rf public_content | |
touch .nojekyll | |
- name: 'Download pyk documentation from the Summary Page' | |
uses: actions/download-artifact@v4 | |
with: | |
name: pyk-docs.zip | |
- name: 'Unzip pyk documentation artifact' | |
run: | | |
ls | |
unzip pyk-docs.zip -d gh-pages/pyk | |
- name: 'List files' | |
working-directory: gh-pages | |
run: find . |