Skip to content

Commit db44d1f

Browse files
committed
Updating workflow to deal with llc
1 parent ad631c8 commit db44d1f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/rust-test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
steps:
3333
- uses: actions/checkout@v4
3434

35+
- name: Install Rust (for local testing)
36+
run: |
37+
curl https://sh.rustup.rs -sSf | sh -s -- -y
38+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
39+
export PATH="$HOME/.cargo/bin:$PATH"
40+
3541
- name: Set up Rust
3642
run: rustup override set stable && rustup update
3743

@@ -76,6 +82,12 @@ jobs:
7682
steps:
7783
- uses: actions/checkout@v4
7884

85+
- name: Install Rust (for local testing)
86+
run: |
87+
curl https://sh.rustup.rs -sSf | sh -s -- -y
88+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
89+
export PATH="$HOME/.cargo/bin:$PATH"
90+
7991
- name: Set up Rust
8092
run: rustup show
8193

@@ -84,6 +96,32 @@ jobs:
8496
with:
8597
save-if: ${{ github.ref_name == 'master' || github.ref_name == 'development' }}
8698

99+
- name: Install LLVM Tools (Ubuntu)
100+
if: matrix.os == 'ubuntu-latest'
101+
run: |
102+
sudo apt-get update
103+
sudo apt-get install -y llvm clang
104+
which llc
105+
llc --version
106+
107+
- name: Install LLVM Tools (macOS)
108+
if: matrix.os == 'macos-latest'
109+
run: |
110+
brew install llvm
111+
echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH
112+
# Make sure it's available in the current step too
113+
export PATH="$(brew --prefix llvm)/bin:$PATH"
114+
which llc
115+
116+
- name: Install LLVM Tools (Windows)
117+
if: matrix.os == 'windows-latest'
118+
run: |
119+
choco install llvm
120+
echo "C:/Program Files/LLVM/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
121+
# Verify installation
122+
Get-Command llc.exe -ErrorAction SilentlyContinue | Out-String
123+
& "C:/Program Files/LLVM/bin/llc.exe" --version
124+
87125
- name: Compile tests
88126
run: cargo test --no-run
89127

0 commit comments

Comments
 (0)