Skip to content

Commit

Permalink
Use docker to build pages (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsmithtt authored Sep 11, 2024
1 parent 1e30332 commit 19eca48
Showing 1 changed file with 32 additions and 18 deletions.
50 changes: 32 additions & 18 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,46 @@ concurrency:

jobs:
build:

timeout-minutes: 30
runs-on: macos-latest

strategy:
fail-fast: false
matrix:
image: ["ubuntu-22-04"]
build: [
{runs-on: builder, build_type: Release, enable_runtime: ON}
]

runs-on:
- in-service
- ${{ matrix.build.runs-on }}

container:
image: ghcr.io/${{ github.repository }}/tt-mlir-ci-${{ matrix.image }}:latest
options: --user root

env:
MDBOOK_VERSION: 0.4.36
steps:
MDBOOK_VERSION: v0.4.40

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history and tags

- name: Build and cache ttmlir-toolchain
uses: ./.github/actions/build-toolchain
with:
os: jobs.build.runs-on

- name: Install mdBook
- name: Set reusable strings
id: strings
shell: bash
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
cargo install --version ${MDBOOK_VERSION} mdbook
echo "work-dir=$(pwd)" >> "$GITHUB_OUTPUT"
echo "build-output-dir=$(pwd)/build" >> "$GITHUB_OUTPUT"
- name: Set up Homebrew
uses: homebrew/actions/setup-homebrew@master
- name: Git safe dir
run: git config --global --add safe.directory ${{ steps.strings.outputs.work-dir }}

- name: Install Doxygen
run: brew install doxygen
- name: Install mdBook
run: |
wget https://github.com/rust-lang/mdBook/releases/download/${MDBOOK_VERSION}/mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz
tar xvf mdbook-${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz
- name: Setup Pages
id: pages
Expand All @@ -53,7 +66,8 @@ jobs:
shell: bash
run: |
source env/activate
cmake -B build -S ${{ github.workspace }}
export PATH="$PATH:${{ steps.strings.outputs.work-dir }}"
cmake -B build -S ${{ steps.strings.outputs.work-dir }}
cmake --build build -- doxygen
- name: Upload artifact
Expand Down

0 comments on commit 19eca48

Please sign in to comment.