diff --git a/.github/workflows/anghabench-after-build.yml b/.github/workflows/anghabench-after-build.yml index 44e324a4..7335eb3d 100644 --- a/.github/workflows/anghabench-after-build.yml +++ b/.github/workflows/anghabench-after-build.yml @@ -8,12 +8,49 @@ on: types: [completed] jobs: - AnghaSmallRun: + start-runner: if: github.event.workflow_run.conclusion == 'success' + name: Start self-hosted EC2 runner runs-on: ubuntu-latest strategy: matrix: - llvm: ["14"] + ec2: + - { ami: ami-0610b26d76319237e, instance-type: m6i.8xlarge} + outputs: + label: ${{ steps.start-ec2-runner.outputs.label }} + ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Start EC2 runner + id: start-ec2-runner + uses: machulav/ec2-github-runner@v2 + with: + mode: start + github-token: ${{ secrets.ACCESS_TOKEN }} + ec2-image-id: ${{ matrix.ec2.ami }} + ec2-instance-type: ${{ matrix.ec2.instance-type }} + subnet-id: subnet-0deb935f0bbfe1a5d + security-group-id: sg-0f6a02eb80fafb982 + aws-resource-tags: > # optional, requires additional permissions + [ + {"Key": "Name", "Value": "ec2-github-runner"}, + {"Key": "GitHubRepository", "Value": "${{ github.repository }}"} + ] + do-the-job: + strategy: + fail-fast: false + matrix: + llvm: [ '14' ] + run_size: [ '1k' ] + + name: Run AnghaBench CI (AMD64) + needs: start-runner # required to start the main job when the runner is ready + runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner steps: - uses: actions/checkout@v2 with: @@ -24,10 +61,138 @@ jobs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - - name: Run against ${{ matrix.llvm }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - name: Fix github token auth + shell: bash + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + run: | + export HOME=${HOME:-/root} + git config --global user.name "CI User" && git config --global user.email "ci@none.local" + git config --global url."https://${ACCESS_TOKEN}@github.com/".insteadOf "git@github.com:" + - name: Set up pre-requisies run: | - external/lifting-tools-ci/cloud/run-do-droplet.py --name "Rellic CI Run Post Build" --script scripts/run-on-anghabench.sh --env-vars RUN_SIZE=1k,RELLIC_BRANCH=${BRANCH},LLVM_VERSION=${{ matrix.llvm }} + sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get -qqy upgrade + sudo apt-get install -qqy \ + git curl wget unzip xz-utils pixz jq s3cmd ninja-build pkg-config \ + liblzma-dev zlib1g-dev libtinfo-dev build-essential \ + libc6-dev:i386 libstdc++-*-dev:i386 g++-multilib + wget "https://github.com/Kitware/CMake/releases/download/v3.22.3/cmake-3.22.3-linux-$(uname -m).sh" && \ + /bin/bash cmake-*.sh --skip-license --prefix=/usr/local && rm cmake-*.sh + python3 -m pip install requests + - name: Build rellic against LLVM ${{ matrix.llvm }} + run: | + ./scripts/build.sh \ + --install \ + --extra-cmake-args "-DCMAKE_BUILD_TYPE=Release" \ + --download-dir "$(pwd)/../pre-built-llvm-${{ matrix.llvm }}" \ + --llvm-version ${{ matrix.llvm }} \ + - name: Fetch Angha Data for LLVM {{ matrix.llvm }} + run: | + pushd external/lifting-tools-ci + if [[ -f requirements.txt ]] + then + python3 -m pip install -r requirements.txt + fi + + mkdir -p $(pwd)/decompiled + mkdir -p $(pwd)/recompiled + + datasets/fetch_anghabench.sh --clang "${LLVM_VERSION}" --bitcode --run-size "${RUN_SIZE}" + + for i in *.tar.xz + do + tar -xJf $i + done + popd env: + LLVM_VERSION: ${{ matrix.llvm }} + RUN_SIZE: ${{ matrix.run_size }} + + - name: Run Angha Against LLVM {{ matrix.llvm }} + run: | + + pushd external/lifting-tools-ci + # Run the benchmark + tool_run_scripts/rellic.py \ + --run-name "[${RUN_NAME}] [size: ${RUN_SIZE}] [rellic: ${RELLIC_BRANCH}]" \ + --rellic rellic-decomp \ + --input-dir $(pwd)/bitcode \ + --output-dir $(pwd)/decompiled \ + --slack-notify + + # Try to recompile our decompiled code + tool_run_scripts/recompile.py \ + --run-name "[${RUN_NAME}] [size: ${RUN_SIZE}] [recompile]" \ + --clang clang-${LLVM_VERSION} \ + --input-dir $(pwd)/decompiled \ + --output-dir $(pwd)/recompiled \ + --slack-notify + env: + RUN_SIZE: ${{ matrix.run_size }} + RELLIC_BRANCH: ${{ steps.extract_branch.outputs.branch }} + RUN_NAME: "Rellic After Build CI Run" SLACK_HOOK: ${{ secrets.SLACK_HOOK }} DO_TOKEN: ${{ secrets.DO_TOKEN }} - BRANCH: ${{ steps.extract_branch.outputs.branch }} + LLVM_VERSION: ${{ matrix.llvm }} + + - name: Save Angha Run for LLVM {{ matrix.llvm }} + run: | + # AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY passed in from original invocation environment + if [[ "${AWS_ACCESS_KEY_ID,,}" != "" ]] + then + datenow=$(date +'%F-%H-%M') + url_base="https://tob-amp-ci-results.nyc3.digitaloceanspaces.com" + tar -Ipixz -cf rellic-ci-${datenow}.tar.xz decompiled + tar -Ipixz -cf recompile-ci-${datenow}.tar.xz recompiled + + s3cmd -c /dev/null \ + '--host-bucket=%(bucket)s.nyc3.digitaloceanspaces.com' \ + --acl-public \ + put \ + rellic-ci-${datenow}.tar.xz \ + s3://tob-amp-ci-results/rellic/ + + tool_run_scripts/slack.py \ + --msg "Uploaded rellic decompilation results to ${url_base}/rellic/rellic-ci-${datenow}.tar.xz" + + s3cmd -c /dev/null \ + '--host-bucket=%(bucket)s.nyc3.digitaloceanspaces.com' \ + --acl-public \ + put \ + recompile-ci-${datenow}.tar.xz \ + s3://tob-amp-ci-results/recompile/ + + tool_run_scripts/slack.py \ + --msg "Uploaded recompilation results to ${url_base}/recompile/recompile-ci-${datenow}.tar.xz" + fi + env: + AWS_ACCESS_KEY_ID: ${{ secrets.DO_SPACES_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_SPACES_SECRET }} + SLACK_HOOK: ${{ secrets.SLACK_HOOK }} + + stop-runner: + name: Stop self-hosted EC2 runner + needs: + - start-runner # required to get output from the start-runner job + - do-the-job # required to wait when the main job is done + runs-on: ubuntu-latest + if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Stop EC2 runner + uses: machulav/ec2-github-runner@v2 + with: + mode: stop + github-token: ${{ secrets.ACCESS_TOKEN }} + label: ${{ needs.start-runner.outputs.label }} + ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} + diff --git a/.github/workflows/anghabench-cron-jobs.yml b/.github/workflows/anghabench-cron-jobs.yml index 8d28c4e1..84da8f38 100644 --- a/.github/workflows/anghabench-cron-jobs.yml +++ b/.github/workflows/anghabench-cron-jobs.yml @@ -6,33 +6,191 @@ on: - cron: "0 3 * * *" jobs: - AnghaBenchRuns: + start-runner: + if: github.event.workflow_run.conclusion == 'success' + name: Start self-hosted EC2 runner runs-on: ubuntu-latest strategy: matrix: - llvm: ["14"] + ec2: + - { ami: ami-0610b26d76319237e, instance-type: m6i.8xlarge} + outputs: + label: ${{ steps.start-ec2-runner.outputs.label }} + ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Start EC2 runner + id: start-ec2-runner + uses: machulav/ec2-github-runner@v2 + with: + mode: start + github-token: ${{ secrets.ACCESS_TOKEN }} + ec2-image-id: ${{ matrix.ec2.ami }} + ec2-instance-type: ${{ matrix.ec2.instance-type }} + subnet-id: subnet-0deb935f0bbfe1a5d + security-group-id: sg-0f6a02eb80fafb982 + aws-resource-tags: > # optional, requires additional permissions + [ + {"Key": "Name", "Value": "ec2-github-runner"}, + {"Key": "GitHubRepository", "Value": "${{ github.repository }}"} + ] + do-the-job: + strategy: + fail-fast: false + matrix: + llvm: [ '14' ] + run_size: [ '1k' ] + + name: Run AnghaBench CI (AMD64) + needs: start-runner # required to start the main job when the runner is ready + runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner steps: - uses: actions/checkout@v2 with: + ref: ${{ github.event.workflow_run.head_branch }} submodules: true # https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions - name: Extract branch name shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch - - name: Small Run (1K) against LLVM ${{ matrix.llvm }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: 3.8 + - name: Fix github token auth + shell: bash + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + run: | + export HOME=${HOME:-/root} + git config --global user.name "CI User" && git config --global user.email "ci@none.local" + git config --global url."https://${ACCESS_TOKEN}@github.com/".insteadOf "git@github.com:" + - name: Set up pre-requisies run: | - external/lifting-tools-ci/cloud/run-do-droplet.py --name "Rellic CI 1K Run" --script scripts/run-on-anghabench.sh --env-vars RUN_SIZE=1k,RELLIC_BRANCH=${BRANCH},LLVM_VERSION=${{ matrix.llvm }} + sudo dpkg --add-architecture i386 && sudo apt-get update && sudo apt-get -qqy upgrade + sudo apt-get install -qqy \ + git curl wget unzip xz-utils pixz jq s3cmd ninja-build pkg-config \ + liblzma-dev zlib1g-dev libtinfo-dev build-essential \ + libc6-dev:i386 libstdc++-*-dev:i386 g++-multilib + wget "https://github.com/Kitware/CMake/releases/download/v3.22.3/cmake-3.22.3-linux-$(uname -m).sh" && \ + /bin/bash cmake-*.sh --skip-license --prefix=/usr/local && rm cmake-*.sh + python3 -m pip install requests + - name: Build rellic against LLVM ${{ matrix.llvm }} + run: | + ./scripts/build.sh \ + --install \ + --extra-cmake-args "-DCMAKE_BUILD_TYPE=Release" \ + --download-dir "$(pwd)/../pre-built-llvm-${{ matrix.llvm }}" \ + --llvm-version ${{ matrix.llvm }} \ + - name: Fetch Angha Data for LLVM {{ matrix.llvm }} + run: | + pushd external/lifting-tools-ci + if [[ -f requirements.txt ]] + then + python3 -m pip install -r requirements.txt + fi + + mkdir -p $(pwd)/decompiled + mkdir -p $(pwd)/recompiled + + datasets/fetch_anghabench.sh --clang "${LLVM_VERSION}" --bitcode --run-size "${RUN_SIZE}" + + for i in *.tar.xz + do + tar -xJf $i + done + popd env: + LLVM_VERSION: ${{ matrix.llvm }} + RUN_SIZE: ${{ matrix.run_size }} + + - name: Run Angha Against LLVM {{ matrix.llvm }} + run: | + + pushd external/lifting-tools-ci + # Run the benchmark + tool_run_scripts/rellic.py \ + --run-name "[${RUN_NAME}] [size: ${RUN_SIZE}] [rellic: ${RELLIC_BRANCH}]" \ + --rellic rellic-decomp \ + --input-dir $(pwd)/bitcode \ + --output-dir $(pwd)/decompiled \ + --slack-notify + + # Try to recompile our decompiled code + tool_run_scripts/recompile.py \ + --run-name "[${RUN_NAME}] [size: ${RUN_SIZE}] [recompile]" \ + --clang clang-${LLVM_VERSION} \ + --input-dir $(pwd)/decompiled \ + --output-dir $(pwd)/recompiled \ + --slack-notify + env: + RUN_SIZE: ${{ matrix.run_size }} + RELLIC_BRANCH: ${{ steps.extract_branch.outputs.branch }} + RUN_NAME: "Rellic Cron Job CI Run" SLACK_HOOK: ${{ secrets.SLACK_HOOK }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} DO_TOKEN: ${{ secrets.DO_TOKEN }} - BRANCH: ${{ steps.extract_branch.outputs.branch }} - #- name: Big Run (1M) against LLM ${{ matrix.llvm }} - # run: | - # external/lifting-tools-ci/cloud/run-do-droplet.py --name "Rellic CI 1M Run" --script scripts/run-on-anghabench.sh --env-vars RUN_SIZE=1m,RELLIC_BRANCH=${BRANCH},LLVM_VERSION=${{ matrix.llvm }} - # env: - # SLACK_HOOK: ${{ secrets.SLACK_HOOK }} - # DO_TOKEN: ${{ secrets.DO_TOKEN }} - # BRANCH: ${{ steps.extract_branch.outputs.branch }} + LLVM_VERSION: ${{ matrix.llvm }} + + - name: Save Angha Run for LLVM {{ matrix.llvm }} + run: | + # AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY passed in from original invocation environment + if [[ "${AWS_ACCESS_KEY_ID,,}" != "" ]] + then + datenow=$(date +'%F-%H-%M') + url_base="https://tob-amp-ci-results.nyc3.digitaloceanspaces.com" + tar -Ipixz -cf rellic-ci-${datenow}.tar.xz decompiled + tar -Ipixz -cf recompile-ci-${datenow}.tar.xz recompiled + + s3cmd -c /dev/null \ + '--host-bucket=%(bucket)s.nyc3.digitaloceanspaces.com' \ + --acl-public \ + put \ + rellic-ci-${datenow}.tar.xz \ + s3://tob-amp-ci-results/rellic/ + + tool_run_scripts/slack.py \ + --msg "Uploaded rellic decompilation results to ${url_base}/rellic/rellic-ci-${datenow}.tar.xz" + + s3cmd -c /dev/null \ + '--host-bucket=%(bucket)s.nyc3.digitaloceanspaces.com' \ + --acl-public \ + put \ + recompile-ci-${datenow}.tar.xz \ + s3://tob-amp-ci-results/recompile/ + + tool_run_scripts/slack.py \ + --msg "Uploaded recompilation results to ${url_base}/recompile/recompile-ci-${datenow}.tar.xz" + fi + env: + AWS_ACCESS_KEY_ID: ${{ secrets.DO_SPACES_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_SPACES_SECRET }} + SLACK_HOOK: ${{ secrets.SLACK_HOOK }} + + stop-runner: + name: Stop self-hosted EC2 runner + needs: + - start-runner # required to get output from the start-runner job + - do-the-job # required to wait when the main job is done + runs-on: ubuntu-latest + if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Stop EC2 runner + uses: machulav/ec2-github-runner@v2 + with: + mode: stop + github-token: ${{ secrets.ACCESS_TOKEN }} + label: ${{ needs.start-runner.outputs.label }} + ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b975fe92..d5f44634 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,38 @@ on: - '*' jobs: + start-runner: + name: Start self-hosted EC2 runner (Linux) + runs-on: ubuntu-latest + strategy: + matrix: + ec2: + - { ami: ami-0610b26d76319237e, instance-type: m6i.8xlarge} + outputs: + label: ${{ steps.start-ec2-runner.outputs.label }} + ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Start EC2 runner + id: start-ec2-runner + uses: machulav/ec2-github-runner@v2 + with: + mode: start + github-token: ${{ secrets.ACCESS_TOKEN }} + ec2-image-id: ${{ matrix.ec2.ami }} + ec2-instance-type: ${{ matrix.ec2.instance-type }} + subnet-id: subnet-0deb935f0bbfe1a5d + security-group-id: sg-0f6a02eb80fafb982 + aws-resource-tags: > # optional, requires additional permissions + [ + {"Key": "Name", "Value": "ec2-github-runner"}, + {"Key": "GitHubRepository", "Value": "${{ github.repository }}"} + ] build_linux: strategy: fail-fast: false @@ -27,7 +59,9 @@ jobs: '14' ] - runs-on: ubuntu-20.04 + name: Rellic CI + needs: start-runner # required to start the main job when the runner is ready + runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner container: image: docker.pkg.github.com/lifting-bits/cxx-common/vcpkg-builder-${{ matrix.image.name }}:${{ matrix.image.tag }} credentials: @@ -50,7 +84,7 @@ jobs: echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" >> /etc/apt/sources.list echo "deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main" >> /etc/apt/sources.list apt-get update - apt-get install -y pixz xz-utils make rpm python3.8 + apt-get install -y ninja-build pixz xz-utils make rpm python3.8 update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 100 - name: Build with build script @@ -120,6 +154,28 @@ jobs: name: ${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm${{ matrix.llvm }}_tgz_package path: ${{ steps.package_names.outputs.TGZ_PACKAGE_PATH }} + stop-runner: + name: Stop self-hosted EC2 runner (Linux) + needs: + - start-runner # required to get output from the start-runner job + - build_linux # required to wait when the main job is done + runs-on: ubuntu-latest + if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Stop EC2 runner + uses: machulav/ec2-github-runner@v2 + with: + mode: stop + github-token: ${{ secrets.ACCESS_TOKEN }} + label: ${{ needs.start-runner.outputs.label }} + ec2-instance-id: ${{ needs.start-runner.outputs.ec2-instance-id }} + build_mac: strategy: fail-fast: false @@ -141,6 +197,8 @@ jobs: with: fetch-depth: 0 submodules: true + - name: Install Ninja Build + run: brew install ninja - name: Build with build script shell: bash run: | diff --git a/.github/workflows/diff_tests.yml b/.github/workflows/diff_tests.yml index d4bada95..44752d4a 100644 --- a/.github/workflows/diff_tests.yml +++ b/.github/workflows/diff_tests.yml @@ -6,7 +6,39 @@ on: - '*' jobs: - build_linux: + start-runner: + name: Start self-hosted EC2 runner (Linux) + runs-on: ubuntu-latest + strategy: + matrix: + ec2: + - { ami: ami-0610b26d76319237e, instance-type: m6i.8xlarge} + outputs: + label: ${{ steps.start-ec2-runner.outputs.label }} + ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }} + steps: + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: ${{ secrets.AWS_REGION }} + - name: Start EC2 runner + id: start-ec2-runner + uses: machulav/ec2-github-runner@v2 + with: + mode: start + github-token: ${{ secrets.ACCESS_TOKEN }} + ec2-image-id: ${{ matrix.ec2.ami }} + ec2-instance-type: ${{ matrix.ec2.instance-type }} + subnet-id: subnet-0deb935f0bbfe1a5d + security-group-id: sg-0f6a02eb80fafb982 + aws-resource-tags: > # optional, requires additional permissions + [ + {"Key": "Name", "Value": "ec2-github-runner"}, + {"Key": "GitHubRepository", "Value": "${{ github.repository }}"} + ] + do-the-job: strategy: fail-fast: false matrix: @@ -19,7 +51,9 @@ jobs: CC: clang-${{ matrix.llvm }} CXX: clang++-${{ matrix.llvm }} - runs-on: ubuntu-20.04 + name: Diff in ouput between old and new rellic + needs: start-runner # required to start the main job when the runner is ready + runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner container: image: docker.pkg.github.com/lifting-bits/cxx-common/vcpkg-builder-${{ matrix.image.name }}:${{ matrix.image.tag }} credentials: @@ -49,7 +83,7 @@ jobs: echo "deb http://apt.llvm.org/${{ matrix.image.codename }}/ llvm-toolchain-${{ matrix.image.codename }}-${{ matrix.llvm }} main" >> /etc/apt/sources.list echo "deb-src http://apt.llvm.org/${{ matrix.image.codename }}/ llvm-toolchain-${{ matrix.image.codename }}-${{ matrix.llvm }} main" >> /etc/apt/sources.list apt-get update - apt-get install -y pixz xz-utils make rpm python3.8 clang-${{ matrix.llvm }} + apt-get install -y ninja-build pixz xz-utils make rpm python3.8 clang-${{ matrix.llvm }} update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 100 - name: Download cxx-commons shell: bash @@ -61,13 +95,13 @@ jobs: - name: Build old rellic shell: bash run: | - cmake -S old -B rellic-build-old -DVCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm-${{ matrix.llvm }}_amd64 + cmake -G Ninja -S old -B rellic-build-old -DVCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm-${{ matrix.llvm }}_amd64 cmake --build rellic-build-old - name: Build new rellic shell: bash run: | - cmake -S . -B rellic-build -DVCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm-${{ matrix.llvm }}_amd64 + cmake -G Ninja -S . -B rellic-build -DVCPKG_ROOT=$GITHUB_WORKSPACE/vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_llvm-${{ matrix.llvm }}_amd64 cmake --build rellic-build - name: Print job summary @@ -108,4 +142,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, body: message - }) \ No newline at end of file + }) diff --git a/scripts/build.sh b/scripts/build.sh index 0e665ce5..428f8272 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -231,6 +231,7 @@ function Configure ( set -x cmake \ + -G Ninja \ -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \ -DCMAKE_VERBOSE_MAKEFILE=True \ -DVCPKG_ROOT="${DOWNLOAD_DIR}/${LIBRARY_VERSION}" \