Skip to content

Commit

Permalink
Switch back to using custom LLVM builds on CI
Browse files Browse the repository at this point in the history
Closes: #2921
  • Loading branch information
silwol committed Jun 14, 2022
1 parent c9f406c commit 8ddddd7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 25 deletions.
30 changes: 5 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ jobs:
- build: linux-x64
os: ubuntu-18.04
artifact_name: 'wasmer-linux-amd64'
llvm_url: 'https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz'
llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/13.x/llvm-linux-amd64.tar.xz'
cross_compilation_artifact_name: 'cross_compiled_from_linux'
use_sccache: true
use_llvm: true
- build: macos-x64
os: macos-11
llvm_url: 'https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz'
llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/13.x/llvm-darwin-amd64.tar.xz'
artifact_name: 'wasmer-darwin-amd64'
cross_compilation_artifact_name: 'cross_compiled_from_mac'
use_sccache: true
Expand All @@ -63,14 +63,14 @@ jobs:
- build: windows-x64
os: windows-2019
artifact_name: 'wasmer-windows-amd64'
# llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/12.x/windows-amd64.tar.gz'
#llvm_choco_version: 13.0.0
llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/13.x/llvm-windows-amd64.tar.xz'
cross_compilation_artifact_name: 'cross_compiled_from_win'
use_sccache: true
use_llvm: false
- build: linux-musl-x64
os: ubuntu-latest
artifact_name: 'wasmer-linux-musl-amd64'
llvm_url: 'https://github.com/wasmerio/llvm-custom-builds/releases/download/13.x/llvm-linux-amd64.tar.xz'
container: alpine:latest
use_sccache: false
use_llvm: false
Expand Down Expand Up @@ -103,14 +103,6 @@ jobs:
override: true
- uses: Swatinem/rust-cache@v1
if: matrix.use_sccache != true
- name: Install LLVM (Choco - Windows)
if: matrix.llvm_choco_version
shell: bash
run: |
choco install llvm --version ${{ matrix.llvm_choco_version }} --allow-downgrade
cd 'C:\Program Files\LLVM\'
LLVM_DIR=$(pwd)
echo "LLVM_SYS_120_PREFIX=${LLVM_DIR}" >> $GITHUB_ENV
- name: Install LLVM (macOS Apple Silicon)
if: matrix.os == 'macos-11.0' && !matrix.llvm_url
run: |
Expand All @@ -119,10 +111,9 @@ jobs:
if: matrix.llvm_url
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf ${{ matrix.llvm_url }} -L -o llvm.tar.xz
LLVM_DIR=$(pwd)/${{ env.LLVM_DIR }}
mkdir ${LLVM_DIR}
tar xf llvm.tar.xz --strip-components=1 -C ${LLVM_DIR}
curl --proto '=https' --tlsv1.2 -sSf ${{ matrix.llvm_url }} -L -o - | tar xJv -C ${LLVM_DIR}
echo "${LLVM_DIR}/bin" >> $GITHUB_PATH
echo "LLVM_SYS_120_PREFIX=${LLVM_DIR}" >> $GITHUB_ENV
env:
Expand Down Expand Up @@ -261,17 +252,6 @@ jobs:
docker build -t wasmer/aarch64 /home/runner/work/wasmer/wasmer/.github/cross-linux-aarch64/
env:
CROSS_DOCKER_IN_DOCKER: true
#- name: Install LLVM
# shell: bash
# run: |
# curl --proto '=https' --tlsv1.2 -sSf "https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-aarch64-linux-gnu.tar.xz" -L -o llvm.tar.xz
# LLVM_DIR=$(pwd)/${{ env.LLVM_DIR }}
# mkdir ${LLVM_DIR}
# tar xf llvm.tar.xz --strip-components=1 -C ${LLVM_DIR}
# echo "${LLVM_DIR}/bin" >> $GITHUB_PATH
# echo "LLVM_SYS_120_PREFIX=${LLVM_DIR}" >> $GITHUB_ENV
# env:
# LLVM_DIR: .llvm
- name: Build Wasmer binary
run: |
make build-wasmer
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Looking for changes that affect our C API? See the [C API Changelog](lib/c-api/C

## **Unreleased**

### Changed
- [#2949](https://github.com/wasmerio/wasmer/pull/2949) Switch back to using custom LLVM builds on CI

### Fixed
- [#2942](https://github.com/wasmerio/wasmer/pull/2942) Fix clippy lints.
- [#2943](https://github.com/wasmerio/wasmer/pull/2943) Fix build error on some archs by using c_char instead of i8
Expand Down

0 comments on commit 8ddddd7

Please sign in to comment.