Skip to content

Commit 74b63f3

Browse files
committed
fix ci
1 parent 3e9cf35 commit 74b63f3

4 files changed

Lines changed: 18 additions & 48 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ jobs:
171171
# echo "$HOME/.zvm/self" >> $GITHUB_PATH
172172
#
173173
# - name: Install LLVM
174-
# run: brew install llvm@21 && echo "$(brew --prefix llvm@21)/bin" >> $GITHUB_PATH
175174
#
176175
# - name: Build
177176
# run: make build
@@ -305,7 +304,6 @@ jobs:
305304
# echo "$HOME/.zvm/self" >> $GITHUB_PATH
306305
#
307306
# - name: Install LLVM
308-
# run: brew install llvm@21 && echo "$(brew --prefix llvm@21)/bin" >> $GITHUB_PATH
309307
#
310308
# - name: Build
311309
# run: make build
@@ -336,7 +334,7 @@ jobs:
336334
matrix:
337335
build_mode: [release]
338336
env:
339-
LLVM_VERSION: "18"
337+
LLVM_VERSION: "22"
340338
steps:
341339
- uses: actions/checkout@v4
342340

@@ -416,7 +414,7 @@ jobs:
416414
echo " ❌ Failed: $FAIL"
417415
echo " 📊 Functions: $TOTAL_FUNCS"
418416
echo " 🐛 Issues: $TOTAL_ISSUES"
419-
echo " Success Rate: $(( SUCCESS * 100 / TOTAL ))%"
417+
echo " Success Rate: $(if [ $TOTAL -gt 0 ]; then echo $(( SUCCESS * 100 / TOTAL )); else echo 0; fi)%"
420418
echo "========================================="
421419
422420
- name: Upload analysis results
@@ -438,7 +436,7 @@ jobs:
438436
echo "| **Failed** | ❌ $FAIL |" >> $GITHUB_STEP_SUMMARY
439437
echo "| **Functions** | $TOTAL_FUNCS |" >> $GITHUB_STEP_SUMMARY
440438
echo "| **Issues Found** | 🐛 $TOTAL_ISSUES |" >> $GITHUB_STEP_SUMMARY
441-
echo "| **Success Rate** | $(( SUCCESS * 100 / TOTAL ))% |" >> $GITHUB_STEP_SUMMARY
439+
echo "| **Success Rate** | $(if [ $TOTAL -gt 0 ]; then echo $(( SUCCESS * 100 / TOTAL )); else echo 0; fi)% |" >> $GITHUB_STEP_SUMMARY
442440
443441
sarif-upload:
444442
name: SARIF Report
@@ -547,7 +545,7 @@ jobs:
547545
runs-on: ubuntu-latest
548546
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/dev'
549547
env:
550-
LLVM_VERSION: "18"
548+
LLVM_VERSION: "22"
551549
steps:
552550
- uses: actions/checkout@v4
553551

.github/workflows/release.yml

Lines changed: 10 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -46,45 +46,17 @@ jobs:
4646
4747
- name: Install LLVM
4848
run: |
49+
# Install LLVM 22 using official apt.llvm.org repository
4950
sudo apt-get update
50-
sudo apt-get install -y llvm-18-dev clang-18 libclang-18-dev
51-
echo "/usr/lib/llvm-18/bin" >> $GITHUB_PATH
52-
53-
- name: Build Release
54-
run: make build
55-
56-
- name: Package
57-
run: |
58-
mkdir -p dist
59-
cp zig-out/bin/OmniScope dist/OmniScope-linux-x86_64
60-
chmod +x dist/OmniScope-linux-x86_64
61-
62-
- name: Upload Artifact
63-
uses: actions/upload-artifact@v4
64-
with:
65-
name: OmniScope-linux-x86_64
66-
path: dist/OmniScope-linux-x86_64
67-
retention-days: 1
68-
69-
build-macos-aarch64:
70-
name: Build (macOS aarch64)
71-
needs: ci-gate
72-
runs-on: macos-latest
73-
steps:
74-
- uses: actions/checkout@v4
75-
76-
- name: Install ZVM and Zig
77-
run: |
78-
curl -sSL https://www.zvm.app/install.sh | bash
79-
export ZVM_INSTALL="$HOME/.zvm/self"
80-
export PATH="$HOME/.zvm/bin:$ZVM_INSTALL:$PATH"
81-
zvm install ${{ env.ZIG_VERSION }}
82-
zvm use ${{ env.ZIG_VERSION }}
83-
echo "$HOME/.zvm/bin" >> $GITHUB_PATH
84-
echo "$HOME/.zvm/self" >> $GITHUB_PATH
85-
86-
- name: Install LLVM
87-
run: brew install llvm@22 && echo "$(brew --prefix llvm@22)/bin" >> $GITHUB_PATH
51+
sudo apt-get install -y lsb-release wget software-properties-common gnupg
52+
53+
# Add LLVM apt repository (modern method without deprecated apt-key)
54+
wget -qO- https://apt.llvm.org/llvm.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/llvm-archive-keyring.gpg
55+
echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-22 main" | sudo tee /etc/apt/sources.list.d/llvm.list
56+
57+
sudo apt-get update
58+
sudo apt-get install -y llvm-22-dev clang-22 libclang-22-dev
59+
echo "/usr/lib/llvm-22/bin" >> $GITHUB_PATH
8860
8961
- name: Build Release
9062
run: zig build -Doptimize=ReleaseFast

build.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ fn getDefaultLLVMPath() []const u8 {
66

77
return switch (os) {
88
.macos => "/opt/homebrew/opt/llvm",
9-
.linux => "/usr/lib/llvm-18",
9+
.linux => "/usr/lib/llvm-22",
1010
.windows => "C:\\Program Files\\LLVM",
11-
else => "/usr/lib/llvm-18",
11+
else => "/usr/lib/llvm-22",
1212
};
1313
}
1414

1515
/// Get the default LLVM version for the current OS
1616
fn getDefaultLLVMVersion() []const u8 {
17-
return "18";
17+
return "22";
1818
}
1919

2020
/// Build configuration for OmniScope

scripts/install_deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set -e
99
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1010
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
1111

12-
LLVM_VERSION=18
12+
LLVM_VERSION=22
1313
ZIG_VERSION="0.15.2"
1414

1515
for arg in "$@"; do

0 commit comments

Comments
 (0)