@@ -886,3 +886,42 @@ jobs:
886886 ${{ env.package }}-*/build/callback/minitests*.output.*
887887 retention-days : 7
888888 overwrite : true
889+ # This is not a platform-specific test, but very useful for finding cross-compilation bugs.
890+ check-cross :
891+ name : make check with a cross-compiler
892+ needs : build-tarball
893+ runs-on : ubuntu-22.04
894+ steps :
895+ # This is needed because we run a script stored in this repository.
896+ - uses : actions/checkout@v4
897+ # Download the artifact to $GITHUB_WORKSPACE.
898+ # Doc: https://github.com/actions/download-artifact?tab=readme-ov-file#usage
899+ - uses : actions/download-artifact@v4
900+ with :
901+ name : tarball
902+ - run : uname -a
903+ - run : id
904+ - run : env | LC_ALL=C sort
905+ - run : pwd
906+ # Install Ubuntu packages.
907+ # List of packages: https://packages.ubuntu.com/
908+ - run : sudo apt update; sudo apt install g++-riscv64-linux-gnu
909+ - run : |
910+ pwd
911+ export CPPFLAGS="-Wall"
912+ export CC="riscv64-linux-gnu-gcc"
913+ export CXX="riscv64-linux-gnu-g++"
914+ ./build-on.sh '${{ env.package }}' '--host=riscv64-linux-gnu' 'make'
915+ # Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
916+ # https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
917+ - if : ${{ always() }}
918+ uses : actions/upload-artifact@v4
919+ with :
920+ name : logs-cross
921+ path : |
922+ ${{ env.package }}-*/build/config.cache
923+ ${{ env.package }}-*/build/config.log
924+ ${{ env.package }}-*/build/config.status
925+ ${{ env.package }}-*/build/log[12]
926+ retention-days : 7
927+ overwrite : true
0 commit comments