chore: Build bpf-linker and LLVM for multiple targets #6
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: Release | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
llvm: | ||
uses: ./.github/workflows/llvm.yml | ||
compiler-rt: | ||
uses: ./.github/workflow/compiler-rt.yml | ||
upload-bins: | ||
strategy: | ||
matrix: | ||
include: | ||
- target: aarch64-unknown-linux-musl | ||
llvm-target: aarch64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: aarch64-apple-darwin | ||
llvm-target: aarch64-apple-darwin | ||
os: macos-latest | ||
- target: x86_64-unknown-linux-musl | ||
llvm-target: x86_64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: x86_64-apple-darwin | ||
llvm-target: x86_64-apple-darwin | ||
os: macos-latest | ||
runs-on: ${{ matrix.os }} | ||
needs: | ||
- llvm | ||
- compiler-rt | ||
steps: | ||
- name: Restore LLVM | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: llvm-install | ||
key: ${{ needs.llvm.outputs[format('cache-key-{0}', matrix.llvm-target)] }} | ||
fail-on-cache-miss: true | ||
- name: Add LLVM to PATH | ||
run: | | ||
echo "${{ github.workspace }}/llvm-install/bin" >> $GITHUB_PATH | ||
echo "$PATH" | ||
- uses: actions/checkout@v4 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: taiki-e/setup-cross-toolchain-action@v1 | ||
if: startsWith(matrix.os, 'ubuntu') | ||
with: | ||
target: ${{ matrix.target }} | ||
- uses: taiki-e/upload-rust-binary-action@v1 | ||
with: | ||
bin: bpf-linker | ||
target: ${{ matrix.target }} | ||
features: llvm-sys/force-static | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |