|
| 1 | +# |
| 2 | +# Copyright (c) 2022-present, Trail of Bits, Inc. |
| 3 | +# All rights reserved. |
| 4 | +# |
| 5 | +# This source code is licensed in accordance with the terms specified in |
| 6 | +# the LICENSE file found in the root directory of this source tree. |
| 7 | +# |
| 8 | + |
| 9 | +name: "Release-test" |
| 10 | + |
| 11 | +on: |
| 12 | + workflow_run: |
| 13 | + workflows: ["Build"] |
| 14 | + types: |
| 15 | + - completed |
| 16 | + branches: |
| 17 | + - "master" |
| 18 | + |
| 19 | +permissions: write-all |
| 20 | + |
| 21 | +jobs: |
| 22 | + build: |
| 23 | + strategy: |
| 24 | + matrix: |
| 25 | + llvm-version: [17] |
| 26 | + image-version: [22.04] |
| 27 | + |
| 28 | + name: "Release-test" |
| 29 | + runs-on: ubuntu-${{ matrix.image-version }} |
| 30 | + if: ${{ github.event.workflow_run.conclusion == 'success' }} |
| 31 | + timeout-minutes: 60 |
| 32 | + container: |
| 33 | + image: |
| 34 | + ghcr.io/trailofbits/vast-ubuntu-${{ matrix.image-version }}-llvm-${{ matrix.llvm-version }}-dev:latest |
| 35 | + |
| 36 | + env: |
| 37 | + CMAKE_PREFIX_PATH: "/usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/mlir/;/usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/clang/" |
| 38 | + TOOLCHAIN: ${{ github.workspace }}/cmake/lld.toolchain.cmake |
| 39 | + LLVM_EXTERNAL_LIT: "/usr/local/bin/lit" |
| 40 | + |
| 41 | + steps: |
| 42 | + - name: Clone the VAST repository |
| 43 | + uses: actions/checkout@v3 |
| 44 | + with: |
| 45 | + submodules: true |
| 46 | + fetch-depth: 1 |
| 47 | + |
| 48 | + - name: Configure build |
| 49 | + run: | |
| 50 | + cmake --preset ninja-multi-default --toolchain ${TOOLCHAIN} \ |
| 51 | + -DCMAKE_VERBOSE_MAKEFILE=True \ |
| 52 | + -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} \ |
| 53 | + -DLLVM_EXTERNAL_LIT=${LLVM_EXTERNAL_LIT} |
| 54 | +
|
| 55 | + - name: Build release |
| 56 | + run: | |
| 57 | + cmake --build --preset ninja-rel -j $(nproc) |
| 58 | + cpack -G TXZ --config ./builds/ninja-multi-default/CPackConfig.cmake |
| 59 | +
|
| 60 | + - name: Publish Pre-Release |
| 61 | + uses: softprops/action-gh-release@v1 |
| 62 | + with: |
| 63 | + tag_name: "latest" |
| 64 | + prerelease: true |
| 65 | + generate_release_notes: true |
| 66 | + files: | |
| 67 | + ./LICENSE |
| 68 | + ./builds/ninja-multi-default/package/* |
| 69 | +
|
| 70 | + - name: Upload VAST artiface |
| 71 | + uses: actions/upload-artifact@v4 |
| 72 | + with: |
| 73 | + files: | |
| 74 | + ./LICENSE |
| 75 | + ./builds/ninja-multi-default/package/* |
| 76 | +
|
| 77 | + - name: Build VAST Doc |
| 78 | + run: cmake --build --preset ninja-rel --target vast-doc |
| 79 | + |
| 80 | + - name: Build Pages |
| 81 | + run: | |
| 82 | + sh ./www/setup.sh _site ./builds/ninja-multi-default/ |
| 83 | +
|
| 84 | + - name: Deploy docs |
| 85 | + uses: mhausenblas/mkdocs-deploy-gh-pages@master |
| 86 | + env: |
| 87 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 88 | + CONFIG_FILE: _site/mkdocs.yml |
0 commit comments