deps: require zlib 1.2+
This commit is contained in:
28
.github/workflows/go.yml
vendored
28
.github/workflows/go.yml
vendored
@@ -26,18 +26,38 @@ jobs:
|
|||||||
if: startsWith(matrix.os, 'macos')
|
if: startsWith(matrix.os, 'macos')
|
||||||
run: |
|
run: |
|
||||||
brew update
|
brew update
|
||||||
brew install llvm@${{ matrix.llvm }} pkg-config bdw-gc openssl cjson sqlite python@3.12
|
brew install llvm@${{matrix.llvm}} pkg-config bdw-gc openssl
|
||||||
echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH
|
echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
# Install optional deps for demos.
|
||||||
|
#
|
||||||
|
# NOTE: Keep this list updated as new deps are introduced.
|
||||||
|
opt_deps=(
|
||||||
|
cjson # for github.com/goplus/llgo/c/cjson
|
||||||
|
sqlite # for github.com/goplus/llgo/c/sqlite
|
||||||
|
python@3.12 # for github.com/goplus/llgo/py
|
||||||
|
)
|
||||||
|
brew install "${opt_deps[@]}"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
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
|
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 -
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
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
|
sudo apt-get install -y llvm-${{matrix.llvm}}-dev clang-${{matrix.llvm}} lld-${{matrix.llvm}} pkg-config libgc-dev libssl-dev zlib1g-dev
|
||||||
echo "/usr/lib/llvm-${{matrix.llvm}}/bin" >> $GITHUB_PATH
|
echo "/usr/lib/llvm-${{matrix.llvm}}/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
# Install optional deps for demos.
|
||||||
|
#
|
||||||
|
# NOTE: Keep this list updated as new deps are introduced.
|
||||||
|
opt_deps=(
|
||||||
|
libcjson-dev # for github.com/goplus/llgo/c/cjson
|
||||||
|
libsqlite3-dev # for github.com/goplus/llgo/c/sqlite
|
||||||
|
python3.12-dev # for github.com/goplus/llgo/py
|
||||||
|
)
|
||||||
|
sudo apt-get install -y "${opt_deps[@]}"
|
||||||
|
|
||||||
- name: Clang information
|
- name: Clang information
|
||||||
run: |
|
run: |
|
||||||
echo $PATH
|
echo $PATH
|
||||||
@@ -67,12 +87,12 @@ jobs:
|
|||||||
if: matrix.os != 'ubuntu-latest'
|
if: matrix.os != 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
echo "Test result on ${{matrix.os}} with LLVM ${{matrix.llvm}}" > result.md
|
echo "Test result on ${{matrix.os}} with LLVM ${{matrix.llvm}}" > result.md
|
||||||
LLGOROOT=$PWD bash .github/workflows/test_llgo.sh
|
bash .github/workflows/test_llgo.sh
|
||||||
|
|
||||||
- name: Test _demo and _pydemo
|
- name: Test _demo and _pydemo
|
||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
LLGOROOT=$PWD bash .github/workflows/test_demo.sh
|
bash .github/workflows/test_demo.sh
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
- name: Show test result
|
- name: Show test result
|
||||||
|
|||||||
2
.github/workflows/test_llgo.sh
vendored
2
.github/workflows/test_llgo.sh
vendored
@@ -1,8 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
export LLGOROOT=$PWD
|
|
||||||
|
|
||||||
testcmd=/tmp/test
|
testcmd=/tmp/test
|
||||||
llgo build -o $testcmd ./c/bdwgc/_test
|
llgo build -o $testcmd ./c/bdwgc/_test
|
||||||
cases=$($testcmd)
|
cases=$($testcmd)
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -317,8 +317,7 @@ Here are the Go packages that can be imported correctly:
|
|||||||
- [pkg-config 0.29+](https://www.freedesktop.org/wiki/Software/pkg-config/)
|
- [pkg-config 0.29+](https://www.freedesktop.org/wiki/Software/pkg-config/)
|
||||||
- [bdwgc/libgc 8.0+](https://www.hboehm.info/gc/)
|
- [bdwgc/libgc 8.0+](https://www.hboehm.info/gc/)
|
||||||
- [OpenSSL 3.0+](https://www.openssl.org/)
|
- [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))
|
- [zlib 1.2+](https://www.zlib.net)
|
||||||
- [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))
|
- [Python 3.12+](https://www.python.org) (optional, for [github.com/goplus/llgo/py](https://pkg.go.dev/github.com/goplus/llgo/py))
|
||||||
|
|
||||||
## How to install
|
## How to install
|
||||||
@@ -328,10 +327,9 @@ Follow these steps to generate the `llgo` command (its usage is the same as the
|
|||||||
### on macOS
|
### on macOS
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew update # execute if needed
|
brew update
|
||||||
brew install llvm@18 pkg-config bdw-gc openssl
|
brew install llvm@18 pkg-config bdw-gc openssl
|
||||||
brew install cjson sqlite python@3.12 # optional
|
brew install 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
|
go install -v github.com/goplus/llgo/cmd/llgo@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -340,10 +338,9 @@ go install -v github.com/goplus/llgo/cmd/llgo@latest
|
|||||||
```sh
|
```sh
|
||||||
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
|
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 -
|
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||||
sudo apt-get update # execute if needed
|
sudo apt-get update
|
||||||
sudo apt-get install -y llvm-18-dev clang-18 lld-18 pkg-config libgc-dev libssl-dev
|
sudo apt-get install -y llvm-18-dev clang-18 lld-18 pkg-config libgc-dev libssl-dev zlib1g-dev
|
||||||
sudo apt-get install -y libcjson-dev libsqlite3-dev python3.12-dev # optional
|
sudo apt-get install -y 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
|
go install -v github.com/goplus/llgo/cmd/llgo@latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user