Set GitHub CI #8
This file contains hidden or 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: Deploy | |
| on: [push, workflow_dispatch] | |
| jobs: | |
| build-launcher: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| python-version: [ "3.8" ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Configure system for container mode | |
| run: | | |
| echo "Enabling unprivileged user namespaces..." | |
| sudo sysctl kernel.unprivileged_userns_clone=1 | |
| sudo sysctl -w user.max_user_namespaces=10000 | |
| - name: Install system dependencies | |
| run: | | |
| echo "Installing required packages..." | |
| sudo apt-get update | |
| sudo apt-get install -y openjdk-17-jdk | |
| echo "Configuring Java 17 as default..." | |
| sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1 | |
| sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac 1 | |
| sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java | |
| sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac | |
| echo "JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64" >> $GITHUB_ENV | |
| - name: Install Python dependencies | |
| run: | | |
| python3 -m pip install --upgrade pip | |
| pip3 install -r requirements.txt | |
| - name: Build and deploy Continuous Verification Framework | |
| run: | | |
| echo "Building and deploying CV..." | |
| make install -j"$(nproc)" DEPLOY_DIR=build | |
| - name: Run integration tests | |
| run: | | |
| echo "Running integration tests..." | |
| cp -r docs/examples/sources/ build/ | |
| cd build | |
| python3 ./launcher/launch.py -c configs/it.json | |
| echo "Verifying results..." | |
| grep "it;smg;no_memory_leak_caller;TRUE;SUCCESS" results/report_launches_it_*.csv || exit 1 | |
| grep "it;smg;memory_leak_caller;FALSE;SUCCESS" results/report_launches_it_*.csv || exit 1 |