-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: allow set TOOLPREFIX * readme: add cross build steps * ci: Setup cross build * ci: use var in step name * ci: split build / build test * ci: add more arch * ci: update ppc triple * ci: update actions/checkout * ci: todo: fix arm cross build * ci: add more misp ci * ci: remove mips64, mips64el * ci: add more ppc ci * ci: reopen arm CI
- Loading branch information
1 parent
fc36466
commit 4b83beb
Showing
3 changed files
with
83 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Cross | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
tags: '*' | ||
|
||
jobs: | ||
build-cross-qemu: | ||
runs-on: ubuntu-latest | ||
name: build-cross-qemu-${{ matrix.config.arch }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { arch: arm, triple: arm-linux-gnueabihf } | ||
- { arch: aarch64, triple: aarch64-linux-gnu } | ||
- { arch: ppc, triple: powerpc-linux-gnu } | ||
- { arch: ppc64, triple: powerpc64-linux-gnu } | ||
- { arch: ppc64le, triple: powerpc64le-linux-gnu } | ||
- { arch: mips, triple: mips-linux-gnu } | ||
- { arch: mipsel, triple: mipsel-linux-gnu } | ||
# Builds successfully, but tests fail. | ||
# - { arch: mips64, triple: mips64-linux-gnuabi64 } | ||
# - { arch: mips64el, triple: mips64el-linux-gnuabi64 } | ||
- { arch: riscv64, triple: riscv64-linux-gnu } | ||
- { arch: s390x, triple: s390x-linux-gnu } | ||
env: | ||
ARCH: ${{ matrix.config.arch }} | ||
TRIPLE: ${{ matrix.config.triple }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install QEMU | ||
# this ensure install latest qemu on ubuntu, apt get version is old | ||
env: | ||
QEMU_SRC: "http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu" | ||
QEMU_VER: "qemu-user-static_7\\.2+dfsg-.*_amd64.deb$" | ||
run: | | ||
DEB=`curl -s $QEMU_SRC/ | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $QEMU_VER | tail -1` | ||
wget $QEMU_SRC/$DEB | ||
sudo dpkg -i $DEB | ||
- name: Install toolchain gcc-${{ matrix.config.triple }} | ||
run: | | ||
sudo apt update | ||
sudo apt install gcc-$TRIPLE -y | ||
- name: Build with ${{ matrix.config.triple }}-gcc | ||
run: make ARCH=$ARCH TOOLPREFIX=$TRIPLE- | ||
- name: Build tests | ||
run: make -C test ARCH=$ARCH TOOLPREFIX=$TRIPLE- | ||
- name: Run Tests | ||
env: | ||
QEMU_EXEC: qemu-${{ matrix.config.arch }}-static | ||
CROSS_LIB: /usr/${{ matrix.config.triple }} | ||
run: | | ||
$QEMU_EXEC -L . -L $CROSS_LIB/ test/test-float | ||
$QEMU_EXEC -L . -L $CROSS_LIB/ test/test-double |
This file contains 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
This file contains 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