ci:test release without llvm dependency
This commit is contained in:
26
.github/actions/setup-deps/action.yml
vendored
26
.github/actions/setup-deps/action.yml
vendored
@@ -5,6 +5,10 @@ inputs:
|
|||||||
description: "LLVM version to install"
|
description: "LLVM version to install"
|
||||||
required: true
|
required: true
|
||||||
default: "19"
|
default: "19"
|
||||||
|
install-llvm:
|
||||||
|
description: "Whether to install LLVM"
|
||||||
|
required: false
|
||||||
|
default: "true"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@@ -14,9 +18,17 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
brew update
|
brew update
|
||||||
brew install llvm@${{inputs.llvm-version}} lld@${{inputs.llvm-version}} bdw-gc openssl libffi libuv
|
|
||||||
brew link --overwrite llvm@${{inputs.llvm-version}} lld@${{inputs.llvm-version}} libffi
|
# Install LLVM if requested
|
||||||
|
if [[ "${{ inputs.install-llvm }}" == "true" ]]; then
|
||||||
|
brew install llvm@${{inputs.llvm-version}} lld@${{inputs.llvm-version}}
|
||||||
|
brew link --overwrite llvm@${{inputs.llvm-version}} lld@${{inputs.llvm-version}}
|
||||||
echo "$(brew --prefix llvm@${{inputs.llvm-version}})/bin" >> $GITHUB_PATH
|
echo "$(brew --prefix llvm@${{inputs.llvm-version}})/bin" >> $GITHUB_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install common dependencies
|
||||||
|
brew install bdw-gc openssl libffi libuv
|
||||||
|
brew link --overwrite libffi
|
||||||
|
|
||||||
# Install optional deps for demos.
|
# Install optional deps for demos.
|
||||||
#
|
#
|
||||||
@@ -31,11 +43,19 @@ runs:
|
|||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
# Install LLVM if requested
|
||||||
|
if [[ "${{ inputs.install-llvm }}" == "true" ]]; then
|
||||||
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{inputs.llvm-version}} main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{inputs.llvm-version}} 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-${{inputs.llvm-version}}-dev clang-${{inputs.llvm-version}} libclang-${{inputs.llvm-version}}-dev lld-${{inputs.llvm-version}} libunwind-${{inputs.llvm-version}}-dev libc++-${{inputs.llvm-version}}-dev pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libcjson-dev libuv1-dev
|
sudo apt-get install -y llvm-${{inputs.llvm-version}}-dev clang-${{inputs.llvm-version}} libclang-${{inputs.llvm-version}}-dev lld-${{inputs.llvm-version}} libunwind-${{inputs.llvm-version}}-dev libc++-${{inputs.llvm-version}}-dev
|
||||||
echo "PATH=/usr/lib/llvm-${{inputs.llvm-version}}/bin:$PATH" >> $GITHUB_ENV
|
echo "PATH=/usr/lib/llvm-${{inputs.llvm-version}}/bin:$PATH" >> $GITHUB_ENV
|
||||||
|
else
|
||||||
|
sudo apt-get update
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install common dependencies
|
||||||
|
sudo apt-get install -y pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libcjson-dev libuv1-dev
|
||||||
|
|
||||||
# Install optional deps for demos.
|
# Install optional deps for demos.
|
||||||
#
|
#
|
||||||
|
|||||||
2
.github/actions/test-helloworld/action.yml
vendored
2
.github/actions/test-helloworld/action.yml
vendored
@@ -38,7 +38,7 @@ runs:
|
|||||||
Hello, LLGo!
|
Hello, LLGo!
|
||||||
Hello, LLGo!
|
Hello, LLGo!
|
||||||
Hello LLGo by cpp/std.Str"
|
Hello LLGo by cpp/std.Str"
|
||||||
OUTPUT=$(llgo run . 2>&1)
|
OUTPUT=$(llgo run . 2>&1 | tee /dev/stderr)
|
||||||
if echo "$OUTPUT" | grep -qF "$EXPECTED"; then
|
if echo "$OUTPUT" | grep -qF "$EXPECTED"; then
|
||||||
echo "Basic test passed"
|
echo "Basic test passed"
|
||||||
else
|
else
|
||||||
|
|||||||
2
.github/workflows/release-build.yml
vendored
2
.github/workflows/release-build.yml
vendored
@@ -178,6 +178,8 @@ jobs:
|
|||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v5
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
uses: ./.github/actions/setup-deps
|
uses: ./.github/actions/setup-deps
|
||||||
|
with:
|
||||||
|
install-llvm: false
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user