From f008a65d911e59e99ba2bbe50de443043b4b7b33 Mon Sep 17 00:00:00 2001 From: Aofei Sheng Date: Tue, 30 Jul 2024 14:10:56 +0800 Subject: [PATCH] deps: require OpenSSL 3.0+ --- .github/workflows/go.yml | 24 +++++++++++------------- README.md | 5 +++-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index e373b9d2..7d43725a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,31 +14,29 @@ jobs: test: strategy: matrix: - os: [macos-latest, ubuntu-24.04] - # os: [macos-latest] + os: + - macos-latest + - ubuntu-24.04 llvm: [18] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - name: Update Homebrew - # needed as long as LLVM 18 is still fresh - if: matrix.llvm == 18 && startsWith(matrix.os, 'macos') - run: brew update - - name: Install LLVM ${{ matrix.llvm }} and bdw-gc + - name: Install dependencies if: startsWith(matrix.os, 'macos') run: | - HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@${{ matrix.llvm }} bdw-gc - echo `brew --prefix llvm@${{ matrix.llvm }}`/bin >> $GITHUB_PATH - - name: Install LLVM ${{ matrix.llvm }} and libgc-dev + brew update + brew install llvm@${{ matrix.llvm }} pkg-config bdw-gc openssl cjson sqlite python@3.12 + echo "$(brew --prefix llvm@${{ matrix.llvm }})/bin" >> $GITHUB_PATH + + - name: Install dependencies if: startsWith(matrix.os, 'ubuntu') run: | echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{ matrix.llvm }} main" | sudo tee /etc/apt/sources.list.d/llvm.list wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo apt-get update - sudo apt-get install -y llvm-${{ matrix.llvm }}-dev clang-${{ matrix.llvm }} lld-${{ matrix.llvm }} pkg-config libgc-dev libcjson-dev libsqlite3-dev python3.12-dev - - echo /usr/lib/llvm-${{ matrix.llvm }}/bin >> $GITHUB_PATH + sudo apt-get install -y llvm-${{ matrix.llvm }}-dev clang-${{ matrix.llvm }} lld-${{ matrix.llvm }} pkg-config libgc-dev libssl-dev libcjson-dev libsqlite3-dev python3.12-dev + echo "/usr/lib/llvm-${{ matrix.llvm }}/bin" >> $GITHUB_PATH - name: Clang information run: | diff --git a/README.md b/README.md index a6963999..b52b82d6 100644 --- a/README.md +++ b/README.md @@ -310,6 +310,7 @@ Here are the Go packages that can be imported correctly: - [Clang 18](https://clang.llvm.org) - [pkg-config 0.29+](https://www.freedesktop.org/wiki/Software/pkg-config/) - [bdwgc/libgc 8.0+](https://www.hboehm.info/gc/) +- [OpenSSL 3.0+](https://www.openssl.org/) - [cJSON 1.7+](https://github.com/DaveGamble/cJSON) (optional, for [github.com/goplus/llgo/c/cjson](https://pkg.go.dev/github.com/goplus/llgo/c/cjson)) - [SQLite 3](https://www.sqlite.org) (optional, for [github.com/goplus/llgo/c/sqlite](https://pkg.go.dev/github.com/goplus/llgo/c/sqlite)) - [Python 3.12+](https://www.python.org) (optional, for [github.com/goplus/llgo/py](https://pkg.go.dev/github.com/goplus/llgo/py)) @@ -322,7 +323,7 @@ Follow these steps to generate the `llgo` command (its usage is the same as the ```sh brew update # execute if needed -brew install llvm@18 pkg-config libgc +brew install llvm@18 pkg-config bdw-gc openssl brew install cjson sqlite python@3.12 # optional export PATH=$(brew --prefix llvm@18)/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.zshrc go install -v github.com/goplus/llgo/cmd/llgo@latest @@ -334,7 +335,7 @@ go install -v github.com/goplus/llgo/cmd/llgo@latest echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-18 main" | sudo tee /etc/apt/sources.list.d/llvm.list wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo apt-get update # execute if needed -sudo apt-get install -y llvm-18-dev clang-18 lld-18 pkg-config libgc-dev +sudo apt-get install -y llvm-18-dev clang-18 lld-18 pkg-config libgc-dev libssl-dev sudo apt-get install -y libcjson-dev libsqlite3-dev python3.12-dev # optional export PATH=/usr/lib/llvm-18/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.bashrc go install -v github.com/goplus/llgo/cmd/llgo@latest