diff options
-rwxr-xr-x | .ci/ar-lib (renamed from .travis/ar-lib) | 0 | ||||
-rw-r--r-- | .ci/bfin-sim.exp (renamed from .travis/bfin-sim.exp) | 0 | ||||
-rwxr-xr-x | .ci/build-cross-in-container.sh (renamed from .travis/build-cross-in-container.sh) | 0 | ||||
-rwxr-xr-x | .ci/build-in-container.sh (renamed from .travis/build-in-container.sh) | 0 | ||||
-rwxr-xr-x | .ci/build.sh (renamed from .travis/build.sh) | 6 | ||||
-rwxr-xr-x | .ci/compile (renamed from .travis/compile) | 0 | ||||
-rwxr-xr-x | .ci/install.sh (renamed from .travis/install.sh) | 0 | ||||
-rw-r--r-- | .ci/m32r-sim.exp (renamed from .travis/m32r-sim.exp) | 0 | ||||
-rw-r--r-- | .ci/moxie-sim.exp (renamed from .travis/moxie-sim.exp) | 0 | ||||
-rw-r--r-- | .ci/or1k-sim.exp (renamed from .travis/or1k-sim.exp) | 0 | ||||
-rw-r--r-- | .ci/powerpc-eabisim.exp (renamed from .travis/powerpc-eabisim.exp) | 0 | ||||
-rw-r--r-- | .ci/site.exp (renamed from .travis/site.exp) | 5 | ||||
-rw-r--r-- | .ci/wine-sim.exp (renamed from .travis/wine-sim.exp) | 0 | ||||
-rw-r--r-- | .github/workflows/build.yml | 135 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | .travis.yml | 83 |
16 files changed, 141 insertions, 90 deletions
diff --git a/.travis/ar-lib b/.ci/ar-lib index 0baa4f6..0baa4f6 100755 --- a/.travis/ar-lib +++ b/.ci/ar-lib diff --git a/.travis/bfin-sim.exp b/.ci/bfin-sim.exp index b36d9f0..b36d9f0 100644 --- a/.travis/bfin-sim.exp +++ b/.ci/bfin-sim.exp diff --git a/.travis/build-cross-in-container.sh b/.ci/build-cross-in-container.sh index 7e2252c..7e2252c 100755 --- a/.travis/build-cross-in-container.sh +++ b/.ci/build-cross-in-container.sh diff --git a/.travis/build-in-container.sh b/.ci/build-in-container.sh index 1a7fa76..1a7fa76 100755 --- a/.travis/build-in-container.sh +++ b/.ci/build-in-container.sh diff --git a/.travis/build.sh b/.ci/build.sh index ebd063d..0f2597b 100755 --- a/.travis/build.sh +++ b/.ci/build.sh @@ -45,7 +45,7 @@ function build_linux() function build_foreign_linux() { - ${DOCKER} run --rm -t -i -v $(pwd):/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.travis/build-in-container.sh + ${DOCKER} run --rm -t -i -v $(pwd):/opt ${SET_QEMU_CPU} -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" $2 bash -c /opt/.ci/build-in-container.sh ./rlgl l --key=${RLGL_KEY} https://rl.gl ID=$(./rlgl start) @@ -55,7 +55,7 @@ function build_foreign_linux() function build_cross_linux() { - ${DOCKER} run --rm -t -i -v $(pwd):/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8 ${GCC_OPTIONS}" -e CXX="${HOST}-g++-8 ${GCC_OPTIONS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/cross-ci-build-container:latest bash -c /opt/.travis/build-in-container.sh + ${DOCKER} run --rm -t -i -v $(pwd):/opt ${SET_QEMU_CPU} -e HOST="${HOST}" -e CC="${HOST}-gcc-8 ${GCC_OPTIONS}" -e CXX="${HOST}-g++-8 ${GCC_OPTIONS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/cross-ci-build-container:latest bash -c /opt/.ci/build-in-container.sh ./rlgl l --key=${RLGL_KEY} https://rl.gl ID=$(./rlgl start) @@ -66,7 +66,7 @@ function build_cross_linux() function build_cross() { ${DOCKER} pull quay.io/moxielogic/libffi-ci-${HOST} - ${DOCKER} run --rm -t -i -v $(pwd):/opt -e HOST="${HOST}" -e CC="${HOST}-gcc ${GCC_OPTIONS}" -e CXX="${HOST}-g++ ${GCC_OPTIONS}" -e TRAVIS_BUILD_DIR=/opt -e DEJAGNU="${DEJAGNU}" -e RUNTESTFLAGS="${RUNTESTFLAGS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/libffi-ci-${HOST} bash -c /opt/.travis/build-cross-in-container.sh + ${DOCKER} run --rm -t -i -v $(pwd):/opt -e HOST="${HOST}" -e CC="${HOST}-gcc ${GCC_OPTIONS}" -e CXX="${HOST}-g++ ${GCC_OPTIONS}" -e TRAVIS_BUILD_DIR=/opt -e DEJAGNU="${DEJAGNU}" -e RUNTESTFLAGS="${RUNTESTFLAGS}" -e LIBFFI_TEST_OPTIMIZATION="${LIBFFI_TEST_OPTIMIZATION}" quay.io/moxielogic/libffi-ci-${HOST} bash -c /opt/.ci/build-cross-in-container.sh ./rlgl l --key=${RLGL_KEY} https://rl.gl ID=$(./rlgl start) diff --git a/.travis/compile b/.ci/compile index 655932a..655932a 100755 --- a/.travis/compile +++ b/.ci/compile diff --git a/.travis/install.sh b/.ci/install.sh index 7e87235..7e87235 100755 --- a/.travis/install.sh +++ b/.ci/install.sh diff --git a/.travis/m32r-sim.exp b/.ci/m32r-sim.exp index c18123f..c18123f 100644 --- a/.travis/m32r-sim.exp +++ b/.ci/m32r-sim.exp diff --git a/.travis/moxie-sim.exp b/.ci/moxie-sim.exp index 32979ea..32979ea 100644 --- a/.travis/moxie-sim.exp +++ b/.ci/moxie-sim.exp diff --git a/.travis/or1k-sim.exp b/.ci/or1k-sim.exp index 3920413..3920413 100644 --- a/.travis/or1k-sim.exp +++ b/.ci/or1k-sim.exp diff --git a/.travis/powerpc-eabisim.exp b/.ci/powerpc-eabisim.exp index 285fd4f..285fd4f 100644 --- a/.travis/powerpc-eabisim.exp +++ b/.ci/powerpc-eabisim.exp diff --git a/.travis/site.exp b/.ci/site.exp index 644ec63..79fcc23 100644 --- a/.travis/site.exp +++ b/.ci/site.exp @@ -1,11 +1,11 @@ -# Copyright (C) 2008, 2010, 2018, 2019 Anthony Green +# Copyright (C) 2008, 2010, 2018, 2019, 2021 Anthony Green # Make sure we look in the right place for the board description files. if ![info exists boards_dir] { set boards_dir {} } -lappend boards_dir $::env(TRAVIS_BUILD_DIR)/.travis +lappend boards_dir $::env(RUNNER_WORKSPACE)/libffi/.ci verbose "Global Config File: target_triplet is $target_triplet" 2 global target_list @@ -24,4 +24,3 @@ case "$target_triplet" in { set target_list "or1k-sim" } } - diff --git a/.travis/wine-sim.exp b/.ci/wine-sim.exp index 1ad6038..1ad6038 100644 --- a/.travis/wine-sim.exp +++ b/.ci/wine-sim.exp diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3f791ab --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,135 @@ +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ github-actions ] + pull_request: + branches: [ github-actions ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + + build-sim: + name: Build and test libffi in containers + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - HOST: "powerpc-eabisim" + RUNTESTFLAGS: "--target_board powerpc-eabisim" + DEJAGNU: "/opt/.ci/site.exp" + - HOST: "or1k-elf" + RUNTESTFLAGS: "--target_board or1k-sim" + DEJAGNU: "/opt/.ci/site.exp" + - MEVAL: "export PATH=/opt/moxielogic/bin:$PATH && CC=moxie-elf-gcc && CXX=moxie-elf-g++" + HOST: "moxie-elf" + LDFLAGS: "-Tsim.ld" + DEJAGNU: ".ci/site.exp" + RUNTESTFLAGS: "-v -v -v -v --target_board moxie-sim" + + steps: + - uses: actions/checkout@v2 + + - env: + MEVAL: ${{ matrix.MEVAL }} + HOST: ${{ matrix.HOST }} + LDFLAGS: ${{ matrix.LDFLAGS }} + RUNTESTFLAGS: ${{ matrix.RUNTESTFLAGS }} + DEJAGNU: ${{ matrix.DEJAGNU }} + run: | + set -x + if test x"$MEVAL" != x; then eval ${MEVAL}; fi + echo $HOST + echo $MEVAL + env + pwd + ./.ci/install.sh + ./.ci/build.sh + + build: + name: Build and test libffi on cygwin + runs-on: windows-latest + + strategy: + matrix: + platform: [windows-latest] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Cygwin + uses: egor-tensin/setup-cygwin@v3 + with: + platform: x64 + packages: wget gcc-core make dejagnu automake autoconf libtool texinfo dos2unix unzip + + - run: | + cd $(cygpath $RUNNER_WORKSPACE)/libffi + wget https://rl.gl/cli/rlgl-windows-amd64.zip + unzip rlgl-windows-amd64.zip + find . -name \*.m4|xargs dos2unix + find . -name \*.ac|xargs dos2unix + find . -name \*.am|xargs dos2unix + find . -name \*.host|xargs dos2unix + autoreconf -f -v -i + ./configure + find . -name libtool\*|xargs dos2unix + make -j 4 + TERM=none make check || true + ./rlgl/rlgl.exe l --key=0LIBFFI-0LIBFFI-0LIBFFI-0LIBFFI https://rl.gl + ID=$(./rlgl/rlgl.exe start) + ./rlgl/rlgl.exe e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git $(find . -name libffi.log) + shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' + + build-msvc: + name: Build and test libffi with Visual C++ + runs-on: windows-latest + + strategy: + matrix: + platform: [windows-latest] + + steps: + - uses: actions/checkout@v2 + - uses: egor-tensin/setup-cygwin@v3 + with: + platform: x64 + packages: wget make dejagnu automake autoconf libtool texinfo unzip dos2unix + - uses: ilammy/msvc-dev-cmd@v1.8.1 + - uses: microsoft/setup-msbuild@v1.0.2 + + - name: Build and test + run: | + set -x + echo "====================================================" + dos2unix $(cygpath $RUNNER_WORKSPACE)/libffi/.ci/msvs-detect + $(cygpath $RUNNER_WORKSPACE)/libffi/.ci/msvs-detect --arch=x64 --with-assembler + echo "====================================================" + find "/cygdrive/c/Program Files (x86)/Microsoft Visual Studio" -name \*.exe + export PATH=$PATH:"/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.16.27023/bin/HostX64/x64" + cd $(cygpath $RUNNER_WORKSPACE)/libffi + wget https://rl.gl/cli/rlgl-windows-amd64.zip + unzip rlgl-windows-amd64.zip + find . -name \*.sh|xargs dos2unix + find . -name \*.m4|xargs dos2unix + find . -name \*.ac|xargs dos2unix + find . -name \*.am|xargs dos2unix + find . -name \*.host|xargs dos2unix + dos2unix .ci/ar-lib + autoreconf -f -v -i + ./configure CC="$(pwd)/msvcc.sh -m64" CXX="$(pwd)/msvcc.sh -m64" LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='$(pwd)/.ci/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST $DEBUG_ARG $SHARED_ARG || cat */config.log + find . -name libtool\*|xargs dos2unix + env + make + cp $(find . -name 'libffi-?.dll') x86_64-pc-cygwin/testsuite/ + TERM=none make check || true + ./rlgl/rlgl.exe l --key=0LIBFFI-0LIBFFI-0LIBFFI-0LIBFFI https://rl.gl + ID=$(./rlgl/rlgl.exe start) + ./rlgl/rlgl.exe e --id=$ID --policy=https://github.com/libffi/rlgl-policy.git $(find . -name libffi.log) + shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' @@ -9,7 +9,7 @@ Makefile Makefile.in aclocal.m4 compile -!.travis/compile +!.ci/compile configure depcomp doc/libffi.info diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a18919c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,83 +0,0 @@ ---- -sudo: required - -language: cpp - -# For qemu-powered targets, get the list of supported processors from -# travis by setting QEMU_CPU=help, then set -mcpu= for the compilers -# accordingly. - -matrix: - include: - - os: linux - env: HOST=powerpc-eabisim RUNTESTFLAGS="--target_board powerpc-eabisim" DEJAGNU="/opt/.travis/site.exp" - - os: linux - env: HOST=or1k-elf RUNTESTFLAGS="--target_board or1k-sim" DEJAGNU="/opt/.travis/site.exp" - - os: linux - env: HOST=m32r-elf RUNTESTFLAGS="--target_board m32r-sim" DEJAGNU="/opt/.travis/site.exp" - - os: linux - env: HOST=bfin-elf RUNTESTFLAGS="--target_board bfin-sim" DEJAGNU="/opt/.travis/site.exp" -# This configuration is still using the native x86 toolchain? -# - os: osx -# env: HOST=aarch64-apple-darwin13 - - os: osx - env: HOST=x86_64-apple-darwin10 - - os: linux - env: HOST=x86_64-w64-mingw32 MEVAL='export CC="x86_64-w64-mingw32-gcc" && CXX="x86_64-w64-mingw32-g++" RUNTESTFLAGS="--target_board wine-sim" DEJAGNU="$TRAVIS_BUILD_DIR/.travis/site.exp" CONFIGURE_OPTIONS=--disable-shared LIBFFI_TEST_OPTIMIZATION="-O2" - - os: linux - env: HOST=sh4-linux-gnu CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/sh4-linux-gnu - - os: linux - env: HOST=alpha-linux-gnu CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/alpha-linux-gnu - - os: linux - env: HOST=m68k-linux-gnu MEVAL='export CC="m68k-linux-gnu-gcc-8 -mcpu=547x" && CXX="m68k-linux-gnu-g++-8 -mcpu=547x"' CONFIGURE_OPTIONS=--disable-shared QEMU_LD_PREFIX=/usr/m68k-linux-gnu QEMU_CPU=cfv4e - - os: linux - arch: s390x - env: HOST=s390x-linux-gnu - - os: linux - arch: ppc64le - env: HOST=ppc64le-linux-gnu - - os: linux - arch: arm64 - env: HOST=aarch64-linux-gnu - - os: linux - arch: arm64 - env: HOST=aarch64-linux-gnu - compiler: clang - - os: linux - env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O0" - - os: linux - env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O2" - - os: linux - env: HOST=arm32v7-linux-gnu LIBFFI_TEST_OPTIMIZATION="-O2 -fomit-frame-pointer" -# The sparc64 linux system in the GCC compile farm is non-responsive. -# - os: linux -# env: HOST=sparc64-linux-gnu -# The mips64 linux system in the GCC compile farm is not allowing logins -# - os: linux -# env: HOST=mips64el-linux-gnu - - os: linux - compiler: gcc - env: HOST=i386-pc-linux-gnu MEVAL='export CC="$CC -m32" && CXX="$CXX -m32"' - - os: linux - compiler: gcc - - os: linux - compiler: gcc - env: CONFIGURE_OPTIONS=--disable-shared - - os: linux - compiler: clang - - os: linux - compiler: clang - env: CONFIGURE_OPTIONS=--disable-shared - - os: linux - env: HOST=moxie-elf MEVAL='export PATH=/opt/moxielogic/bin:$PATH && CC=moxie-elf-gcc && CXX=moxie-elf-g++' LDFLAGS=-Tsim.ld RUNTESTFLAGS="--target_board moxie-sim" DEJAGNU="$TRAVIS_BUILD_DIR/.travis/site.exp" - -before_install: - - if test x"$MEVAL" != x; then eval ${MEVAL}; fi - -install: - - travis_wait 60 ./.travis/install.sh - -script: - - if ! test x"$MEVAL" = x; then eval ${MEVAL}; fi - - travis_wait 115 sleep infinity & - - ./.travis/build.sh |