Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ jobs:
uses: actions/checkout@v2
# See https://github.com/google/go-tpm-tools#macos-dev
- name: Install openssl
run: brew install openssl@1.1
run: brew install openssl@3
- name: Link openssl
run: sudo ln -s $(brew --prefix openssl@1.1)/include/openssl /usr/local/include
run: |
sudo mkdir -p /usr/local/include
sudo ln -sfn "$(brew --prefix openssl@3)/include/openssl" /usr/local/include/openssl

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not necessary, you're already adding the C_INCLUDE_PATH bellow. Tested on a macOS with openssl in /opt/homebrew/...

$ brew --prefix openssl@3
/opt/homebrew/opt/openssl@3

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — removed the Link openssl step (6e00673). The Test step already points cgo at the headers/libs via C_INCLUDE_PATH/LIBRARY_PATH using brew --prefix openssl@3, which resolves on both the Intel (/usr/local) and Apple Silicon (/opt/homebrew) layouts, so the /usr/local/include/openssl symlink was redundant. Thanks!

- name: Test
run: C_INCLUDE_PATH="$(brew --prefix openssl@1.1)/include" LIBRARY_PATH="$(brew --prefix openssl@1.1)/lib" go test ./...
run: C_INCLUDE_PATH="$(brew --prefix openssl@3)/include" LIBRARY_PATH="$(brew --prefix openssl@3)/lib" go test ./...
test-windows:
strategy:
matrix:
Expand Down
Loading