From e1846bda2aabb864c87e0a6ecf09ee5d6ccba351 Mon Sep 17 00:00:00 2001 From: Nicholas Smith Date: Mon, 9 Sep 2024 19:24:59 -0500 Subject: [PATCH] Use docker to build pages --- .github/workflows/pages.yml | 50 ++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 42d5b7a07..45971d191 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -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 @@ -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