Add casr-lua to casr-libfuzzer #544
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: amd64 | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
ubuntu-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Update Rust | |
run: rustup update | |
- name: Build | |
run: cargo build --all-features --verbose | |
- name: Run tests | |
run: | | |
sudo apt update && sudo apt install -y gdb pip curl python3-dev llvm \ | |
openjdk-17-jdk ca-certificates gnupg lua5.1 liblua5.1-dev libcurl4-gnutls-dev | |
wget https://luarocks.org/releases/luarocks-3.11.1.tar.gz && tar zxpf luarocks-3.11.1.tar.gz && \ | |
cd luarocks-3.11.1 && ./configure && make && sudo make install && cd .. && rm -rf luarocks-3.11.1.tar.gz luarocks-3.11.1 | |
eval $(luarocks path) | |
wget https://github.com/tarantool/luajit/archive/refs/tags/v2.1.0-beta3.tar.gz && \ | |
tar zxpf v2.1.0-beta3.tar.gz && rm v2.1.0-beta3.tar.gz && cd luajit-2.1.0-beta3 && \ | |
make && sudo make install && sudo ln -sf luajit-2.1.0-beta3 /usr/local/bin/luajit && cd .. && rm -rf luajit-2.1.0-beta3 | |
git clone https://github.com/ligurio/luzer.git && \ | |
cd luzer && git checkout 6e3276c5e6faf18c8c98637162bea0a23f0cd1d3 && sudo luarocks build && cd .. && sudo rm -rf luzer | |
sudo find / -name "libcustom_mutator.so.1" | |
export LUA_CPATH="/home/runner/work/casr/casr/luzer/build.luarocks/luzer/?.so;$LUA_CPATH" | |
# Atheris fails to install on Ubuntu 24.04, see https://github.com/google/atheris/issues/82 | |
# pip3 install atheris | |
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg | |
export NODE_MAJOR=20 | |
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list | |
sudo apt update && sudo apt install -y nodejs | |
sudo npm install -g jsfuzz | |
sudo npm install --save-dev @jazzer.js/core | |
wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb | |
dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb | |
sudo apt update && sudo apt install -y --no-install-recommends dotnet-sdk-8.0 | |
curl https://sh.rustup.rs -o rustup.sh && chmod +x rustup.sh && \ | |
./rustup.sh -y && rm rustup.sh | |
rustup install nightly | |
export PATH=/root/.cargo/bin:$PATH | |
cargo install cargo-fuzz | |
cargo test --release --verbose --lib -- --test-threads 1 | |
cargo test --release --verbose --package casr |