Skip to content

Commit

Permalink
Try to set PKG_CONFIG_PATH in the environment. (#45)
Browse files Browse the repository at this point in the history
This demonstrates how we can avoid setting it later in each step that needs it.  Also we generate llvm.pc into a subdirectory to avoid finding it just because it's in the current working directory.
  • Loading branch information
dabrahams authored Mar 6, 2024
1 parent 23ebbe3 commit b8b7721
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,21 @@ jobs:
with:
path: Swifty-LLVM

- name: Create LLVM pkgconfig file
run: |
- name: Create LLVM pkgconfig file and make it findable
run: >-
set -ex -o pipefail
PATH="${{ github.workspace }}/${{ env.package_basename }}/bin:$PATH" Swifty-LLVM/Tools/make-pkgconfig.sh llvm.pc
mkdir pkg-config
PATH="${{ github.workspace }}/${{ env.package_basename }}/bin:$PATH"
Swifty-LLVM/Tools/make-pkgconfig.sh pkg-config/llvm.pc
echo "PKG_CONFIG_PATH=${GITHUB_WORKSPACE//\\//}/pkg-config" >> $GITHUB_ENV
shell: bash

- name: Test
run: swift test -v ${{ matrix.swift_test_options }} -c ${{ matrix.configuration }}
working-directory: Swifty-LLVM
env:
PKG_CONFIG_PATH: ${{ github.workspace }}

- name: Export Coverage
if: ${{ contains(matrix.swift_test_options, '--enable-code-coverage') }}
Expand Down

0 comments on commit b8b7721

Please sign in to comment.