Skip to content

Commit

Permalink
Put cacheing in the right place
Browse files Browse the repository at this point in the history
  • Loading branch information
dabrahams authored Nov 12, 2024
1 parent 3973138 commit 7a2ef0b
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions .github/workflows/doc-extraction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
swift-version: ${{ env.swift-version }}
cache-snapshot: false # Workaround for https://github.com/SwiftyLab/setup-swift/issues/315

- name: Install LLVM
- name: Install LLVM and create its pkgconfig file
# 7z doesn't support decompressing from a stream or we'd do this all as one statement. Maybe
# we should find a way to use zstd on windows.
run: >-
Expand All @@ -58,16 +58,25 @@ jobs:
tar -x --zstd -f ${{ env.llvm_package_basename }}.tar.zst
- name: Create LLVM pkgconfig file and make it findable
run: >-
set -ex -o pipefail
PATH="${{ github.workspace }}/${{ env.llvm_package_basename }}/bin:$PATH"
./Tools/make-pkgconfig.sh llvm.pc
echo 'PKG_CONFIG_PATH=${{ github.workspace }}' >> $GITHUB_ENV
- name: Prepare shell environment
run: |
echo "PKG_CONFIG_PATH=${{ github.workspace }}
REPO_SANS_OWNER=${GITHUB_REPOSITORY##*/}
REF_URL_COMPONENT=${GITHUB_REF##*/}
HYLO_ENABLE_DOC_GENERATION=1
" >> "${GITHUB_ENV}"
- uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-debug-spm-${{ hashFiles('./**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-debug-spm-
- name: Prepare Shell Environment
- name: Compute the Extraction Targets
# The format of the ${GITHUB_ENV} file is extremely restrictive; it apparently only supports
# lines of the form:
#
Expand All @@ -80,24 +89,13 @@ jobs:

# FIXME: REF_URL_COMPONENT computation is probably wrong for some refs.
run: |
echo "PKG_CONFIG_PATH=$PWD
REPO_SANS_OWNER=${GITHUB_REPOSITORY##*/}
REF_URL_COMPONENT=${GITHUB_REF##*/}
EXTRACTION_TARGETS=$(
echo "EXTRACTION_TARGETS=$(
swift package dump-package |
jq '.targets | map(select(.type | test("^(regular|executable)$"))) | .[].name' |
xargs
)
HYLO_ENABLE_DOC_GENERATION=1
" >> "${GITHUB_ENV}"
- uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-debug-spm-${{ hashFiles('./**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-debug-spm-
- name: Generate Index Page
run: |
mkdir -p _site
Expand Down

0 comments on commit 7a2ef0b

Please sign in to comment.