|
| 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 |
0 commit comments