Skip to content

Commit

Permalink
Try to make install generic
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jul 3, 2024
1 parent ec4a2fa commit 57406a8
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,34 @@ on:

jobs:
build-and-test:
runs-on: ubuntu-latest
matrix:
metadata: [
{
os: ubuntu-latest,
wasix-toolchain-release-asset: rust-toolchain-x86_64-unknown-linux-gnu.tar.gz,
setup: |
sudo apt-get update
sudo apt-get install -y build-essential python3.11 python3-distutils llvm-15 libclang-dev clang-15 wabt
npm i -g wasm-opt pnpm concurrently
sudo rm /usr/bin/clang
sudo rm /usr/bin/clang++
sudo ln -s /usr/bin/clang-15 /usr/bin/clang
sudo ln -s /usr/bin/clang++-15 /usr/bin/clang++
sudo ln -s /usr/bin/llvm-ar-15 /usr/bin/llvm-ar
sudo ln -s /usr/bin/llvm-nm-15 /usr/bin/llvm-nm
sudo ln -s /usr/bin/llvm-ranlib-15 /usr/bin/llvm-ranlib
sudo ln -s /usr/bin/llvm-objdump-15 /usr/bin/llvm-objdump
}
]
runs-on: ${{ matrix.metadata.os }}
steps:
- name: Check out
uses: actions/checkout@v3
with:
submodules: "recursive"

- name: OS Setup (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install -y build-essential python3.11 python3-distutils llvm-15 libclang-dev clang-15 wabt
npm i -g wasm-opt pnpm concurrently
sudo rm /usr/bin/clang
sudo rm /usr/bin/clang++
sudo ln -s /usr/bin/clang-15 /usr/bin/clang
sudo ln -s /usr/bin/clang++-15 /usr/bin/clang++
sudo ln -s /usr/bin/llvm-ar-15 /usr/bin/llvm-ar
sudo ln -s /usr/bin/llvm-nm-15 /usr/bin/llvm-nm
sudo ln -s /usr/bin/llvm-ranlib-15 /usr/bin/llvm-ranlib
sudo ln -s /usr/bin/llvm-objdump-15 /usr/bin/llvm-objdump
- name: OS Setup
run: ${{ matrix.metadata.setup }}
- name: Tool Versions
run: |
echo clang
Expand Down Expand Up @@ -78,16 +85,16 @@ jobs:
uses: dsaltares/fetch-gh-release-asset@1.1.2
with:
repo: wasix-org/rust
file: rust-toolchain-x86_64-unknown-linux-gnu.tar.gz
file: ${{ matrix.metadata.wasix-toolchain-release-asset }}
target: wasix-rust-toolchain/toolchain.tar.gz

- name: Install wasix toolchain
run: |
cd wasix-rust-toolchain
tar xzf toolchain.tar.gz
chmod +x bin/*
chmod +x lib/rustlib/x86_64-unknown-linux-gnu/bin/*
chmod +x lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld/*
chmod +x lib/rustlib/*/bin/*
chmod +x lib/rustlib/*/bin/gcc-ld/*
rustup toolchain link wasix .
- name: Build native
Expand Down

0 comments on commit 57406a8

Please sign in to comment.