|
| 1 | +name: VCPKG Continuous Integration |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + pull_request: |
| 7 | + schedule: |
| 8 | + # run CI every day even if no PRs/merges occur |
| 9 | + - cron: '0 6 * * *' |
| 10 | + |
| 11 | +jobs: |
| 12 | + build_linux: |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + image: |
| 17 | + - { name: 'ubuntu', tag: '18.04' } |
| 18 | + - { name: 'ubuntu', tag: '20.04' } |
| 19 | + llvm: [ |
| 20 | + '9', |
| 21 | + '10', |
| 22 | + '11' |
| 23 | + ] |
| 24 | + |
| 25 | + runs-on: ubuntu-20.04 |
| 26 | + container: |
| 27 | + image: docker.pkg.github.com/trailofbits/cxx-common/vcpkg-builder-${{ matrix.image.name }}:${{ matrix.image.tag }} |
| 28 | + credentials: |
| 29 | + username: ${{ github.actor }} |
| 30 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 31 | + |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v2 |
| 34 | + - name: Install utility tools |
| 35 | + shell: bash |
| 36 | + run: | |
| 37 | + # TODO some of these should probably live in the Docker build image |
| 38 | + apt-get update |
| 39 | + apt-get install -y pixz xz-utils make |
| 40 | +
|
| 41 | + - name: Build with build script |
| 42 | + shell: bash |
| 43 | + run: ./scripts/build.sh --llvm-version ${{ matrix.llvm }} |
| 44 | + - name: Run tests |
| 45 | + shell: bash |
| 46 | + working-directory: remill-build |
| 47 | + run: | |
| 48 | + cmake --build . --target install -- -j "$(nproc)" |
| 49 | + cmake --build . --target test_dependencies -- -j "$(nproc)" |
| 50 | + env CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test -- -j "$(nproc)" |
| 51 | + - name: Smoketests with installed executable |
| 52 | + shell: bash |
| 53 | + run: | |
| 54 | + remill-lift-${{ matrix.llvm }} --arch amd64 --ir_out /dev/stdout --bytes c704ba01000000 |
| 55 | + remill-lift-${{ matrix.llvm }} --arch aarch64 --ir_out /dev/stdout --address 0x400544 --bytes FD7BBFA90000009000601891FD030091B7FFFF97E0031F2AFD7BC1A8C0035FD6 |
| 56 | +
|
| 57 | + build_mac: |
| 58 | + strategy: |
| 59 | + fail-fast: false |
| 60 | + matrix: |
| 61 | + os: [ |
| 62 | + 'macos-10.15', |
| 63 | + 'macos-11.0' |
| 64 | + ] |
| 65 | + llvm: [ |
| 66 | + '9', |
| 67 | + '10', |
| 68 | + '11' |
| 69 | + ] |
| 70 | + |
| 71 | + runs-on: ${{ matrix.os }} |
| 72 | + |
| 73 | + steps: |
| 74 | + - uses: actions/checkout@v2 |
| 75 | + - name: Build with build script |
| 76 | + shell: bash |
| 77 | + run: ./scripts/build.sh --llvm-version ${{ matrix.llvm }} |
| 78 | + - name: Run tests |
| 79 | + shell: bash |
| 80 | + working-directory: remill-build |
| 81 | + run: | |
| 82 | + cmake --build . --target install -- -j "$(sysctl -n hw.logicalcpu)" |
| 83 | + cmake --build . --target test_dependencies -- -j "$(sysctl -n hw.logicalcpu)" |
| 84 | + env CTEST_OUTPUT_ON_FAILURE=1 cmake --build . --target test -- -j "$(sysctl -n hw.logicalcpu)" |
| 85 | + - name: Smoketests with installed executable |
| 86 | + shell: bash |
| 87 | + run: | |
| 88 | + remill-lift-${{ matrix.llvm }} --arch amd64 --ir_out /dev/stdout --bytes c704ba01000000 |
| 89 | + remill-lift-${{ matrix.llvm }} --arch aarch64 --ir_out /dev/stdout --address 0x400544 --bytes FD7BBFA90000009000601891FD030091B7FFFF97E0031F2AFD7BC1A8C0035FD6 |
0 commit comments