Add MachRegister type query tests #43
Workflow file for this run
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: Pull Request Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| jobs: | |
| # Don't run the check if the PR is a draft | |
| check-if-needed: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.pull_request.draft == false }} | |
| steps: | |
| - shell: bash | |
| run: true | |
| get-oses: | |
| runs-on: ubuntu-latest | |
| needs: check-if-needed | |
| outputs: | |
| latest: ${{ steps.all.outputs.latest }} | |
| steps: | |
| - id: all | |
| uses: dyninst/dyninst/.github/actions/os-versions@master | |
| get-compilers: | |
| runs-on: ubuntu-latest | |
| needs: check-if-needed | |
| outputs: | |
| all: ${{ steps.compilers.outputs.value }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: dyninst/dyninst | |
| fetch-depth: 1 | |
| path: dyninst | |
| - id: compilers | |
| shell: bash | |
| run: | | |
| set -ex | |
| script="${GITHUB_WORKSPACE}/dyninst/.github/scripts/compiler_configs.py" | |
| names=$(python3 ${script} --print-names) | |
| echo "value=${names}" >> $GITHUB_OUTPUT | |
| pr-tests: | |
| runs-on: ubuntu-latest | |
| needs: [get-oses, get-compilers] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ${{ fromJson(needs.get-oses.outputs.latest) }} | |
| compiler: ${{ fromJson(needs.get-compilers.outputs.all) }} | |
| permissions: | |
| packages: read | |
| container: | |
| image: ghcr.io/dyninst/amd64/${{ matrix.os }}-base:latest | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.github_token }} | |
| name: PR tests (${{ matrix.os }}, ${{ matrix.compiler }}) | |
| steps: | |
| - name: Checkout Dyninst | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: dyninst/dyninst | |
| fetch-depth: 1 | |
| path: dyninst | |
| - name: Build Dyninst | |
| uses: ./dyninst/.github/actions/build | |
| with: | |
| os: ${{ matrix.os }} | |
| compiler: ${{ matrix.compiler }} | |
| extra-cmake-flags: "-DDYNINST_EXPORT_ALL=ON" | |
| src-dir: "${GITHUB_WORKSPACE}/dyninst" | |
| install-dir: "${GITHUB_WORKSPACE}/dyninst/install" | |
| - name: Checkout unit-tests | |
| uses: actions/checkout@v4 | |
| with: | |
| path: unit-tests | |
| - name: Build unit-tests | |
| shell: bash | |
| run: | | |
| set -ex | |
| cd unit-tests | |
| mkdir build | |
| case "${{ matrix.compiler }}" in | |
| clang) cc=clang; cxx=clang++; ;; | |
| gcc) cc=gcc; cxx=g++; ;; | |
| esac | |
| flags="-DCMAKE_C_COMPILER=${cc} " | |
| flags+="-DCMAKE_CXX_COMPILER=${cxx} " | |
| flags+="-DDYNINST_SOURCE_TREE=${GITHUB_WORKSPACE}/dyninst " | |
| flags+="-DDyninst_ROOT=${GITHUB_WORKSPACE}/dyninst/install " | |
| cmake . -B build ${flags} | |
| cmake --build build --parallel 2 | |
| - name: Run unit-tests | |
| run: | | |
| cd unit-tests/build | |
| ctest build -VV --output-on-failure . |