Skip to content

New regex

New regex #75

Workflow file for this run

name: main
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
check_app:
runs-on: ubuntu-22.04
steps:
- name: clone_project
uses: actions/checkout@v3
- name: init_submodules
run: git submodule update --init --recursive
- name: apt_dependencies
run: sudo apt update && sudo apt upgrade && sudo apt -y install libarchive-dev libcurl4-openssl-dev zlib1g-dev libelf-dev gcc-multilib g++-multilib make cmake
- name: setup_radare2
run: |
git clone https://github.com/radare/radare2.git
cd radare2
./sys/install.sh
- name: setup_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: setup_go
uses: actions/setup-go@v4
with:
go-version: '>=1.15.0'
- name: setup_python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: compile
run: mkdir build && cd build && cmake .. && make
- name: append_path
run: echo "`pwd`/build" >> $GITHUB_PATH
- name: compile_rust_tests
run: |
echo "Installing Rust 32-bit architecture"
rustup target install i686-unknown-linux-gnu
echo "Compiling Rust tests"
for i in $(seq 1 1 `ls ./test/Rust | wc -l`)
do
echo "Compiling Rust test n°$i"
cd test/Rust/test_$i
cargo build --release
cargo build --release --target=i686-unknown-linux-gnu
cd ../../..
done
- name: run_rust_tests_32
run: |
echo "Running Rust 32bit tests"
for i in $(seq 1 1 `ls ./test/Rust | wc -l`)
do
echo "Starting Rust test n°$i"
cd test/Rust/test_$i/target/i686-unknown-linux-gnu/release
cerberus ./test_$i --no-prompt -output ./test_$i-syms
result=$(nm test_$i-syms)
cd ../../..
expected_result=$(cat 'result.txt')
IFS='\n' read -ra expected_result_arr <<< $expected_result
for expected_result_line in ${expected_result_arr[@]};
do
if [[ $result != *$expected_result_line* ]]
then
echo "Failure !"
echo "Content of result :"
echo $result
exit 1
fi
done
echo "Success !"
cd ../../../
done
- name: run_rust_tests_64
run: |
echo "Running Rust 64bit tests"
for i in $(seq 1 1 `ls ./test/Rust | wc -l`)
do
echo "Starting Rust test n°$i"
cd test/Rust/test_$i/target/release
cerberus ./test_$i --no-prompt -output ./test_$i-syms
result=$(nm test_$i-syms)
cd ../..
expected_result=$(cat 'result.txt')
IFS='\n' read -ra expected_result_arr <<< $expected_result
for expected_result_line in ${expected_result_arr[@]};
do
if [[ $result != *$expected_result_line* ]]
then
echo "Failure !"
echo "Content of result :"
echo $result
exit 1
fi
done
echo "Success !"
cd ../../../
done
- name: compile_go_tests
run: |
for i in $(seq 1 1 `ls ./test/Go | wc -l`)
do
echo "Compiling Go test n°$i"
cd test/Go/test_$i/src
go get ./...
go build -ldflags="-s -w" -o ../test_1 test_1.go
cd ../../../..
done
- name: run_go_tests
run: |
echo "Running Go tests"
for i in $(seq 1 1 `ls ./test/Go | wc -l`)
do
echo "Starting Go test n°$i"
cd test/Go/test_1
cerberus ./test_$i --no-prompt -output ./test_$i-syms
result=$(nm test_$i-syms)
expected_result=$(cat 'result.txt')
IFS='\n' read -ra expected_result_arr <<< $expected_result
for expected_result_line in ${expected_result_arr[@]};
do
if [[ $result != *$expected_result_line* ]]
then
echo "Failure !"
echo "Content of result :"
echo $result
exit 1
fi
done
echo "Success !"
cd ../../../
done