-
Notifications
You must be signed in to change notification settings - Fork 280
Test the remaining JIT backends under QEMU #939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ on: | |
| - chaffinch | ||
| - fruitbat | ||
| - ptarmigan | ||
| - coelacanth | ||
| - zebrilus | ||
| - bee | ||
| push: | ||
|
|
@@ -626,6 +627,106 @@ jobs: | |
| ninja | ||
| ctest -j3 --output-on-failure && (cat ./Testing/Temporary/LastTest.log || true) | ||
|
|
||
| coelacanth: | ||
| # Tests with: cross-compilation and qemu-user, for the JIT backends that no | ||
| # other job covers. A coelacanth is a fish that was thought to be extinct. | ||
| name: QEMU ${{ matrix.config.name }} | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ${{ matrix.config.container }} | ||
| timeout-minutes: 20 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| config: | ||
| # "libc" is the Debian architecture name. It is needed because the | ||
| # cross compilers do not depend on the target's libc headers, and it | ||
| # cannot always be derived from the triple. | ||
| # | ||
| # Ubuntu armhf defaults to Thumb-2, so ARM mode needs asking for. | ||
| - { name: arm, triple: arm-linux-gnueabihf, qemu: arm, libc: armhf, container: "ubuntu:26.04", cflags: -marm } | ||
| - { name: arm-thumb2, triple: arm-linux-gnueabihf, qemu: arm, libc: armhf, container: "ubuntu:26.04", cflags: -mthumb } | ||
| - { name: loongarch64, triple: loongarch64-linux-gnu, qemu: loongarch64, libc: loong64, container: "ubuntu:26.04" } | ||
| # PowerPC big-endian; ptarmigan covers ppc64le, which is a different | ||
| # ABI to ppc64. | ||
| - { name: powerpc, triple: powerpc-linux-gnu, qemu: ppc, libc: powerpc, container: "ubuntu:26.04" } | ||
| - { name: powerpc64, triple: powerpc64-linux-gnu, qemu: ppc64, libc: ppc64, container: "ubuntu:26.04" } | ||
| # These cross compilers come from Debian, which currently has no | ||
| # maintainer for the MIPS cross toolchain packages, so they have not | ||
| # been rebuilt for the release that Ubuntu 26.04 is based on. Hence | ||
| # the older container. (Ubuntu itself never targeted MIPS.) | ||
| - { name: mips, triple: mips-linux-gnu, qemu: mips, libc: mips, container: "ubuntu:24.04" } | ||
| - { name: mipsel, triple: mipsel-linux-gnu, qemu: mipsel, libc: mipsel, container: "ubuntu:24.04" } | ||
| - { name: mips64, triple: mips64-linux-gnuabi64, qemu: mips64, libc: mips64, container: "ubuntu:24.04" } | ||
| - { name: mips64el, triple: mips64el-linux-gnuabi64, qemu: mips64el, libc: mips64el, container: "ubuntu:24.04" } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this mean ubuntu dropped mips support?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ubuntu never had MIPS support, as far as I know. This PR is using Ubuntu because it's convenient and provides access to Debian's cross toolchain packages (which is what these are). What I've gathered is that there is currently no maintainer for the mips cross toolchain packages in Debian, so they haven't been updated in whatever version of Debian feeds into Ubuntu 26.04. |
||
| # MIPS release 6 is a different instruction set to the earlier | ||
| # releases, and SLJIT_MIPS_REV >= 6 selects different code. There is | ||
| # no separate qemu-user binary for it; the emulated CPU has to be | ||
| # named instead, because the defaults predate release 6. | ||
| - { name: mips32r6el, triple: mipsisa32r6el-linux-gnu, qemu: mipsel, libc: mipsr6el, container: "ubuntu:24.04", qemu_cpu: mips32r6-generic } | ||
| - { name: mips64r6el, triple: mipsisa64r6el-linux-gnuabi64, qemu: mips64el, libc: mips64r6el, container: "ubuntu:24.04", qemu_cpu: I6400 } | ||
| if: | | ||
| (github.event_name == 'workflow_dispatch' && (inputs.job_id == 'all' || inputs.job_id == 'coelacanth')) || | ||
| github.event_name == 'push' | ||
| env: | ||
| # Where qemu-user looks for the target's shared libraries. | ||
| QEMU_LD_PREFIX: /usr/${{ matrix.config.triple }} | ||
| steps: | ||
| - name: Setup | ||
| run: | | ||
| apt-get -qq update | ||
| apt-get -qq install -y git autoconf automake libtool make \ | ||
| gcc-${{ matrix.config.triple }} \ | ||
| libc6-dev-${{ matrix.config.libc }}-cross \ | ||
| qemu-user | ||
|
|
||
| # Not set unconditionally: an empty QEMU_CPU makes qemu fail to find | ||
| # a CPU definition. | ||
| if [ -n "${{ matrix.config.qemu_cpu }}" ]; then | ||
| echo "QEMU_CPU=${{ matrix.config.qemu_cpu }}" >> "$GITHUB_ENV" | ||
| fi | ||
| env: | ||
| DEBIAN_FRONTEND: noninteractive | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - name: Prepare | ||
| run: ./autogen.sh | ||
|
|
||
| - name: Configure | ||
| # Shared libraries are disabled so that the test programs are real | ||
| # executables rather than libtool wrapper scripts, which qemu-user | ||
| # cannot run. | ||
| run: | | ||
| ./configure \ | ||
| --build=`./config.guess` \ | ||
| --host=${{ matrix.config.triple }} \ | ||
| CC=${{ matrix.config.triple }}-gcc \ | ||
| CFLAGS="${{ matrix.config.cflags }} $CFLAGS_GCC_STYLE" \ | ||
| --disable-shared \ | ||
| --enable-jit \ | ||
| --enable-pcre2-16 \ | ||
| --enable-pcre2-32 \ | ||
| --enable-debug \ | ||
| --enable-Werror | ||
|
|
||
| - name: Build | ||
| run: make -j$(nproc) | ||
|
|
||
| - name: Test (main test script) | ||
| run: ./RunTest -sim qemu-${{ matrix.config.qemu }} | ||
|
|
||
| - name: Test (JIT test program) | ||
| run: qemu-${{ matrix.config.qemu }} ./pcre2_jit_test | ||
|
mattst88 marked this conversation as resolved.
|
||
|
|
||
| - name: Test (pcre2posix program) | ||
| run: qemu-${{ matrix.config.qemu }} ./pcre2posix_test -v | ||
|
|
||
| # RunGrepTest is skipped as it does not have a "-sim" flag yet. | ||
|
|
||
| zebrilus: | ||
| # Tests with: Zig compiler. A "zebrilus" is known as a "zigzag heron". | ||
| name: Zig | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.