fix: jobs #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Release Lemon | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build-linux-windows: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install clang-format clang-tidy clang-tools clang clangd libc++-dev libc++1 libc++abi-dev libc++abi1 libclang-dev libclang1 liblldb-dev libllvm-ocaml-dev libomp-dev libomp5 lld lldb llvm-dev llvm-runtime llvm python3-clang | |
- name: Debug LLVM Installation | |
run: | | |
llvm-config --version | |
llvm-config --libs | |
ls -la /usr/lib/llvm-18 | |
- name: Set LLVM_SYS environment variable | |
run: echo "LLVM_SYS_180_PREFIX=/usr/lib/llvm-18" >> $GITHUB_ENV | |
- name: Install Rust targets | |
run: | | |
rustup target add x86_64-unknown-linux-gnu | |
rustup target add aarch64-unknown-linux-gnu | |
rustup target add x86_64-pc-windows-gnu | |
- name: Build for Linux (x86_64) | |
run: cargo build --release --target x86_64-unknown-linux-gnu | |
- name: Build for Linux (ARM64) | |
run: cargo build --release --target aarch64-unknown-linux-gnu | |
- name: Build for Windows (x86_64) | |
run: cargo build --release --target x86_64-pc-windows-gnu | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-windows-binaries | |
path: | | |
target/x86_64-unknown-linux-gnu/release/lemon | |
target/aarch64-unknown-linux-gnu/release/lemon | |
target/x86_64-pc-windows-gnu/release/lemon.exe | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install LLVM | |
run: | | |
brew install | |
echo "LLVM_SYS_180_PREFIX=$(brew --prefix llvm)" >> $GITHUB_ENV | |
- name: Install Rust targets | |
run: | | |
rustup target add x86_64-apple-darwin | |
rustup target add aarch64-apple-darwin | |
- name: Build for macOS (x86_64) | |
run: cargo build --release --target x86_64-apple-darwin | |
- name: Build for macOS (ARM64) | |
run: cargo build --release --target aarch64-apple-darwin | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-binaries | |
path: | | |
target/x86_64-apple-darwin/release/lemon | |
target/aarch64-apple-darwin/release/lemon | |
release: | |
needs: [build-linux-windows, build-macos] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download all binaries | |
uses: actions/download-artifact@v3 | |
with: | |
path: artifacts | |
- name: Publish GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
artifacts/linux-windows-binaries/lemon | |
artifacts/linux-windows-binaries/lemon.exe | |
artifacts/macos-binaries/lemon |