From 4e1aea4597346174482c70e3d1e389d5d87436d6 Mon Sep 17 00:00:00 2001 From: Li Jie Date: Sat, 15 Feb 2025 15:18:48 +0800 Subject: [PATCH] ci: run llgo test --- .github/workflows/llgo.yml | 59 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 57 insertions(+), 2 deletions(-) diff --git a/.github/workflows/llgo.yml b/.github/workflows/llgo.yml index a5d7b484..b63ea3c5 100644 --- a/.github/workflows/llgo.yml +++ b/.github/workflows/llgo.yml @@ -10,7 +10,7 @@ on: branches: [ "**" ] jobs: - llgo-test: + llgo: continue-on-error: true strategy: matrix: @@ -94,7 +94,62 @@ jobs: echo "Test lldb with llgo plugin on ${{matrix.os}} with LLVM ${{matrix.llvm}}" bash _lldb/runtest.sh -v - helloworld-test: + test: + continue-on-error: true + strategy: + matrix: + os: + - macos-latest + - ubuntu-24.04 + llvm: [18] + go: ['1.23.6'] + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + uses: ./.github/actions/setup-deps + with: + llvm-version: ${{matrix.llvm}} + - name: Install further optional dependencies for demos + run: | + wget -P ./_demo/llama2-c https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin + py_deps=( + numpy # for github.com/goplus/llgo/py/numpy + torch # for github.com/goplus/llgo/py/torch + ) + pip3.12 install --break-system-packages "${py_deps[@]}" + + - name: Set up Go for build + uses: ./.github/actions/setup-go + with: + go-version: '1.23.6' + + - name: Install + working-directory: compiler + run: | + go install ./... + echo "LLGO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV + + - name: Set up Go for testing + uses: actions/setup-go@v5 + with: + go-version: ${{matrix.go}} + + - name: Verify Go version + run: | + go_version=$(go version | cut -d' ' -f3 | sed 's/go//') + if [[ "$go_version" != "${{matrix.go}}"* ]]; then + echo "Expected Go version ${{matrix.go}}, but got $go_version" + exit 1 + fi + echo "Using Go version: $go_version" + + - name: run llgo test + run: | + cd _demo + llgo test -v ./runtest + + hello: continue-on-error: true strategy: matrix: