-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (58 loc) · 2.05 KB
/
Copy pathgentest.yml
File metadata and controls
65 lines (58 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Test Demo With Generated Pkgs
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
jobs:
test:
strategy:
matrix:
os:
- macos-13
- macos-latest
- ubuntu-24.04
- ubuntu-24.04-arm
llvm: [19]
llgo: [f0728c4fe028fbc72455c1242cef638ebdf60454]
go: [1.23]
fail-fast: false
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- name: Setup llcppg environment
uses: ./.github/actions/setup-llcppg
with:
go: ${{ matrix.go }}
llvm: ${{ matrix.llvm }}
llgo: ${{ matrix.llgo }}
- name: Setup Log directory
run: echo "LLCPPG_TEST_LOG_DIR=$(mktemp -d)" >> $GITHUB_ENV
- name: Test demos with generated pkgs
if: startsWith(matrix.os, 'macos')
run: |
# install demo's lib
brew install cjson lua zlib isl libgpg-error raylib z3 sqlite3 gmp libxml2 libxslt
# Detect Homebrew prefix for different macOS versions and architectures
HOMEBREW_PREFIX=$(brew --prefix)
export PKG_CONFIG_PATH="$HOMEBREW_PREFIX/opt/zlib/lib/pkgconfig"
export PKG_CONFIG_PATH="$HOMEBREW_PREFIX/opt/sqlite/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="$HOMEBREW_PREFIX/opt/libxml2/lib/pkgconfig:$PKG_CONFIG_PATH"
export PKG_CONFIG_PATH="$HOMEBREW_PREFIX/opt/libxslt/lib/pkgconfig:$PKG_CONFIG_PATH"
pkg-config --cflags --libs sqlite3
pkg-config --cflags --libs libxslt
llcppgtest -demos ./_llcppgtest
- name: Test demos with generated pkgs
if: startsWith(matrix.os, 'ubuntu')
run: |
# install demo's lib
sudo apt install libcjson-dev liblua5.4-dev libsqlite3-dev libgmp-dev libgpg-error-dev zlib1g-dev libisl-dev libz3-dev -y
llcppgtest -demos ./_llcppgtest
- name: Upload Logs to Artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{matrix.os}}-log
path: ${{env.LLCPPG_TEST_LOG_DIR}}
retention-days: 1
include-hidden-files: true