Skip to content

Commit ae1d35b

Browse files
authored
Set GitHub CI
2 parents 11008ea + 8c787e6 commit ae1d35b

File tree

5 files changed

+89
-3
lines changed

5 files changed

+89
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
build-launcher:
7+
runs-on: ubuntu-22.04
8+
strategy:
9+
matrix:
10+
python-version: [ "3.8" ]
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
with:
15+
submodules: recursive
16+
fetch-depth: 0
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Configure system for container mode
24+
run: |
25+
echo "Enabling unprivileged user namespaces..."
26+
sudo sysctl kernel.unprivileged_userns_clone=1
27+
sudo sysctl -w user.max_user_namespaces=10000
28+
29+
- name: Install system dependencies
30+
run: |
31+
echo "Installing required packages..."
32+
sudo apt-get update
33+
sudo apt-get install -y openjdk-17-jdk
34+
echo "Configuring Java 17 as default..."
35+
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1
36+
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac 1
37+
sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java
38+
sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
39+
echo "JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64" >> $GITHUB_ENV
40+
41+
- name: Install Python dependencies
42+
run: |
43+
python3 -m pip install --upgrade pip
44+
pip3 install -r requirements.txt
45+
46+
- name: Build and deploy Continuous Verification Framework
47+
run: |
48+
echo "Building and deploying CV..."
49+
make install -j"$(nproc)" DEPLOY_DIR=build
50+
51+
- name: Run integration tests
52+
run: |
53+
echo "Running integration tests..."
54+
cp -r docs/examples/sources/ build/
55+
cd build
56+
python3 ./launcher/launch.py -c configs/it.json
57+
58+
echo "Verifying results..."
59+
grep "it;smg;no_memory_leak_caller;TRUE;SUCCESS" results/report_launches_it_*.csv || exit 1
60+
grep "it;smg;memory_leak_caller;FALSE;SUCCESS" results/report_launches_it_*.csv || exit 1

.github/workflows/pylint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Pylint
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: ["3.8"]
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v3
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install dependencies
18+
run: |
19+
python -m pip install --upgrade pip
20+
pip install pylint
21+
- name: Analysing the code with pylint
22+
run: |
23+
pylint $(git ls-files '*.py')

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,10 @@ install-cif-compiled: build-cif-compiled check-deploy-dir
159159

160160
install-scripts: check-deploy-dir
161161
@mkdir -p ${DEPLOY_DIR}/${install_dir}
162+
@mkdir -p ${root_dir}/${plugin_dir}
162163
@cp ${tools_config_file} ${DEPLOY_DIR}/${install_dir}
163164
@cp ${tools_config_file} cvf/${install_dir}
164-
@cp -r cvf launcher entrypoints patches properties plugin configs ${DEPLOY_DIR}
165+
@cp -r cvf launcher entrypoints patches properties ${plugin_dir} configs ${DEPLOY_DIR}
165166
@mkdir -p ${DEPLOY_DIR}/buildbot
166167

167168
install: check-deploy-dir install-cvv install-benchexec install-cil install-cpa install-scripts install-cpa install-cif-compiled

launcher/launch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
"""
1111
Main launch script.
1212
"""
13+
# pylint: disable=wrong-import-position
1314
import argparse
1415
import sys
1516
from pathlib import Path
1617

17-
cvf_lib = str(Path(__file__).resolve().parent.parent.joinpath("cvf").joinpath("cv"))
18-
sys.path.append(cvf_lib)
18+
CVF_LIB = str(Path(__file__).resolve().parent.parent.joinpath("cvf").joinpath("cv"))
19+
sys.path.append(CVF_LIB)
1920

2021
from solving.full_launcher import FullLauncher as Launcher
2122

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ django
1616
pyyaml
1717
pycparser
1818
sympy
19+
clade==3.6

0 commit comments

Comments
 (0)