Skip to content

Commit 6779c37

Browse files
committed
Add github CI config
1 parent 08c3928 commit 6779c37

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

.github/workflows/deploy.yml

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

0 commit comments

Comments
 (0)