From e55410dc80acd7d40f8a30007870d1ce7ce33034 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Fri, 28 May 2021 04:53:27 -0500 Subject: update badges, further split out actions by OS, add more Linux targets --- .github/workflows/android_test.yml | 4 +- .github/workflows/cross_test.yml | 20 ++++++ .github/workflows/linux_test.yml | 22 +----- .github/workflows/macos_test.yml | 22 ++++++ README.md | 6 +- scripts/test | 143 +++++++++++++++++++++++++++++++++++++ scripts/travis | 143 ------------------------------------- scripts/travis_failure | 18 ----- 8 files changed, 194 insertions(+), 184 deletions(-) create mode 100644 .github/workflows/cross_test.yml create mode 100644 .github/workflows/macos_test.yml create mode 100755 scripts/test delete mode 100755 scripts/travis delete mode 100755 scripts/travis_failure diff --git a/.github/workflows/android_test.yml b/.github/workflows/android_test.yml index ea09846..1632972 100644 --- a/.github/workflows/android_test.yml +++ b/.github/workflows/android_test.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Run CI script - run: ./scripts/travis + run: ./scripts/test build-android-10-11: runs-on: ubuntu-18.04 @@ -27,4 +27,4 @@ jobs: steps: - uses: actions/checkout@v2 - name: Run CI script - run: ./scripts/travis + run: ./scripts/test diff --git a/.github/workflows/cross_test.yml b/.github/workflows/cross_test.yml new file mode 100644 index 0000000..9bcbfac --- /dev/null +++ b/.github/workflows/cross_test.yml @@ -0,0 +1,20 @@ +name: cross_ci + +on: [push, pull_request] + +jobs: + build-other: + strategy: + matrix: + os: [ubuntu-18.04, ubuntu-20.04] + arch: [mingw32, mingw64, arm32, arm64] + runs-on: ${{ matrix.os }} + continue-on-error: true + env: + CC: gcc + ARCH: ${{ matrix.arch }} + name: ${{ matrix.arch }} + steps: + - uses: actions/checkout@v2 + - name: Run CI script + run: ./scripts/test diff --git a/.github/workflows/linux_test.yml b/.github/workflows/linux_test.yml index 42b3834..028c1a4 100644 --- a/.github/workflows/linux_test.yml +++ b/.github/workflows/linux_test.yml @@ -6,7 +6,7 @@ jobs: build-native: strategy: matrix: - os: [macos-latest, ubuntu-18.04] + os: [ubuntu-18.04, ubuntu-20.04] compiler: [clang, gcc] runs-on: ${{ matrix.os }} continue-on-error: false @@ -15,24 +15,6 @@ jobs: ARCH: native name: ${{ matrix.compiler }} - ${{ matrix.os }} steps: - - name: Install packages for macos - if: matrix.os == 'macos-latest' - run: brew install automake - uses: actions/checkout@v2 - name: Run CI script - run: ./scripts/travis - - build-other: - strategy: - matrix: - arch: [mingw32, mingw64, arm32, arm64] - runs-on: ubuntu-18.04 - continue-on-error: true - env: - CC: gcc - ARCH: ${{ matrix.arch }} - name: ${{ matrix.arch }} - steps: - - uses: actions/checkout@v2 - - name: Run CI script - run: ./scripts/travis + run: ./scripts/test diff --git a/.github/workflows/macos_test.yml b/.github/workflows/macos_test.yml new file mode 100644 index 0000000..29e6cdc --- /dev/null +++ b/.github/workflows/macos_test.yml @@ -0,0 +1,22 @@ +name: macos_ci + +on: [push, pull_request] + +jobs: + build-native: + strategy: + matrix: + os: [macos-latest] + compiler: [clang, gcc] + runs-on: ${{ matrix.os }} + continue-on-error: false + env: + CC: ${{ matrix.compiler }} + ARCH: native + name: ${{ matrix.compiler }} - ${{ matrix.os }} + steps: + - name: Install packages for macos + run: brew install automake + - uses: actions/checkout@v2 + - name: Run CI script + run: ./scripts/test diff --git a/README.md b/README.md index f2f5ab0..31c122d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ ![LibreSSL image](https://www.libressl.org/images/libressl.jpg) ## Official portable version of [LibreSSL](https://www.libressl.org) ## -[![Build Status](https://travis-ci.org/libressl-portable/portable.svg?branch=master)](https://travis-ci.org/libressl-portable/portable) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libressl.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libressl) +[![Linux Build Status](https://github.com/libressl-portable/portable/actions/workflows/linux_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/linux_test.yml) +[![macOS Build Status](https://github.com/libressl-portable/portable/actions/workflows/macos_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/macos_test.yml) +[![Android_Build Status](https://github.com/libressl-portable/portable/actions/workflows/android_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/android_test.yml) +[![Cross_Build Status](https://github.com/libressl-portable/portable/actions/workflows/cross_test.yml/badge.svg)](https://github.com/libressl-portable/portable/actions/workflows/cross_test.yml) +[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/libressl.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:libressl) LibreSSL is a fork of [OpenSSL](https://www.openssl.org) 1.0.1g developed by the [OpenBSD](https://www.openbsd.org) project. Our goal is to modernize the codebase, diff --git a/scripts/test b/scripts/test new file mode 100755 index 0000000..80fa988 --- /dev/null +++ b/scripts/test @@ -0,0 +1,143 @@ +#!/bin/sh +set -e + +./autogen.sh + +if [ "x$ARCH" = "xnative" ]; then + # test autotools + ./configure + make -j 4 distcheck + + # make distribution + make dist + tar zxvf libressl-*.tar.gz + cd libressl-* + mkdir build-static + mkdir build-shared + + cd build-static + + # test cmake and ninja + if [ `uname` = "Darwin" ]; then + cmake .. + make + make test + + cd ../build-shared + cmake -DBUILD_SHARED_LIBS=ON .. + make + make test + else + sudo apt-get update + sudo apt-get install -y cmake ninja-build + + cmake -GNinja .. + ninja + ninja test + + cd ../build-shared + cmake -GNinja -DBUILD_SHARED_LIBS=ON .. + ninja + ninja test + fi + +elif [ "x$ARCH" = "xmingw32" -o "x$ARCH" = "xmingw64" ]; then + sudo apt-get update + sudo apt-get install -y cmake ninja-build + + CPU=i686 + if [ "x$ARCH" = "xmingw64" ]; then + CPU=x86_64 + fi + export CC=$CPU-w64-mingw32-gcc + + if [ -z $(which $CC) ]; then + sudo apt-get update + sudo apt-get install -y mingw-w64 make + export PATH=$PATH:/opt/$ARCH/bin + fi + + ./configure --host=$CPU-w64-mingw32 + make -j + + ( + rm -fr build-static + mkdir build-static + cd build-static + cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake .. + ninja + ) + ( + rm -fr build-shared + mkdir build-shared + cd build-shared + cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake -DBUILD_SHARED_LIBS=ON .. + ninja + ) + +elif [ "x$ARCH" = "xarm32" -o "x$ARCH" = "xarm64" ]; then + sudo apt-get update + sudo apt-get install -y qemu-user-static binfmt-support + + if [ "x$ARCH" = "xarm32" ]; then + sudo apt-get install -y g++-arm-linux-gnueabihf + sudo ln -s /usr/arm-linux-gnueabihf/lib/ld-*.*.so /lib/ld-linux-armhf.so.3 + export LD_LIBRARY_PATH=/usr/arm-linux-gnueabihf/lib + export CC=arm-linux-gnueabihf-gcc + ./configure --host=arm-linux + else + sudo apt-get install -y g++-aarch64-linux-gnu + sudo ln -s /usr/aarch64-linux-gnu/lib/ld-*.*.so /lib/ld-linux-aarch64.so.1 + export LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib + export CC=aarch64-linux-gnu-gcc + ./configure --host=aarch64-linux + fi + + make -j 4 check + file apps/openssl/.libs/openssl + +elif [ "x$ARCH" = "xandroid" ]; then + sudo apt-get update + sudo apt-get install -y cmake ninja-build + + export TC_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake + + # set target API level and architecture + level_arch="" + level=$MIN_NAL + while [ $level -le $MAX_NAL ] + do + level_arch="$level_arch $level;x86_64" + level_arch="$level_arch $level;x86" + level_arch="$level_arch $level;arm64-v8a" + + level=`expr $level + 1` + done + + echo "##### level_arch = $level_arch" + + # build each API level and architecture + for la in $level_arch + do + NAL=`echo $la | cut -d ';' -f 1` + ABI=`echo $la | cut -d ';' -f 2` + echo "" + echo "##### Date: `date`, Native API level: $NAL, ABI: $ABI" + + ( + build_dir=build_$NAL_$ABI + rm -fr $build_dir + mkdir $build_dir + cd $build_dir + cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja \ + -DANDROID_NDK=$ANDROID_NDK_HOME \ + -DCMAKE_TOOLCHAIN_FILE=$TC_FILE \ + -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$NAL .. + + ninja -j 4 + + echo "" + file apps/openssl/openssl + ) + done +fi diff --git a/scripts/travis b/scripts/travis deleted file mode 100755 index a18f58c..0000000 --- a/scripts/travis +++ /dev/null @@ -1,143 +0,0 @@ -#!/bin/sh -set -e - -./autogen.sh - -if [ "x$ARCH" = "xnative" ]; then - # test autotools - ./configure - make -j 4 distcheck - - # make distribution - make dist - tar zxvf libressl-*.tar.gz - cd libressl-* - mkdir build-static - mkdir build-shared - - cd build-static - - # test cmake and ninja - if [ `uname` = "Darwin" ]; then - cmake .. - make - make test - - cd ../build-shared - cmake -DBUILD_SHARED_LIBS=ON .. - make - make test - else - sudo apt-get update - sudo apt-get install -y cmake ninja-build - - cmake -GNinja .. - ninja - ninja test - - cd ../build-shared - cmake -GNinja -DBUILD_SHARED_LIBS=ON .. - ninja - ninja test - fi - -elif [ "x$ARCH" = "xmingw32" -o "x$ARCH" = "xmingw64" ]; then - sudo apt-get update - sudo apt-get install -y cmake ninja-build - - CPU=i686 - if [ "x$ARCH" = "xmingw64" ]; then - CPU=x86_64 - fi - export CC=$CPU-w64-mingw32-gcc - - if [ -z $(which $CC) ]; then - sudo apt-get update - sudo apt-get install -y mingw-w64 make - export PATH=$PATH:/opt/$ARCH/bin - fi - - ./configure --host=$CPU-w64-mingw32 - make -j - - ( - rm -fr build-static - mkdir build-static - cd build-static - cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake .. - ninja - ) - ( - rm -fr build-shared - mkdir build-shared - cd build-shared - cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../scripts/$CPU-w64-mingw32.cmake -DBUILD_SHARED_LIBS=ON .. - ninja - ) - -elif [ "x$ARCH" = "xarm32" -o "x$ARCH" = "xarm64" ]; then - sudo apt-get update - sudo apt-get install -y qemu-user-static binfmt-support - - if [ "x$ARCH" = "xarm32" ]; then - sudo apt-get install -y g++-arm-linux-gnueabihf - sudo ln -s /usr/arm-linux-gnueabihf/lib /lib/arm-linux-gnueabihf - sudo ln -s /lib/arm-linux-gnueabihf/ld-2.27.so /lib/ld-linux-armhf.so.3 - export CC=arm-linux-gnueabihf-gcc - ./configure --host=arm-linux - else - sudo apt-get install -y g++-aarch64-linux-gnu - sudo ln -s /usr/aarch64-linux-gnu/lib/ /lib/aarch64-linux-gnu - sudo ln -s /lib/aarch64-linux-gnu/ld-2.27.so /lib/ld-linux-aarch64.so.1 - export CC=aarch64-linux-gnu-gcc - ./configure --host=aarch64-linux - fi - - make -j 4 check - file apps/openssl/.libs/openssl - -elif [ "x$ARCH" = "xandroid" ]; then - sudo apt-get update - sudo apt-get install -y cmake ninja-build - - export TC_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake - - # set target API level and architecture - level_arch="" - level=$MIN_NAL - while [ $level -le $MAX_NAL ] - do - level_arch="$level_arch $level;x86_64" - level_arch="$level_arch $level;x86" - level_arch="$level_arch $level;arm64-v8a" - - level=`expr $level + 1` - done - - echo "##### level_arch = $level_arch" - - # build each API level and architecture - for la in $level_arch - do - NAL=`echo $la | cut -d ';' -f 1` - ABI=`echo $la | cut -d ';' -f 2` - echo "" - echo "##### Date: `date`, Native API level: $NAL, ABI: $ABI" - - ( - build_dir=build_$NAL_$ABI - rm -fr $build_dir - mkdir $build_dir - cd $build_dir - cmake -GNinja -DCMAKE_MAKE_PROGRAM=ninja \ - -DANDROID_NDK=$ANDROID_NDK_HOME \ - -DCMAKE_TOOLCHAIN_FILE=$TC_FILE \ - -DANDROID_ABI=$ABI -DANDROID_NATIVE_API_LEVEL=$NAL .. - - ninja -j 4 - - echo "" - file apps/openssl/openssl - ) - done -fi diff --git a/scripts/travis_failure b/scripts/travis_failure deleted file mode 100755 index 93354fd..0000000 --- a/scripts/travis_failure +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -CWD=`pwd` - -testsdir=`ls -d libressl-*/_build/sub/tests` -if [ -d "$testsdir" ] ; then - echo "##### test logs in $testsdir" - cd $testsdir - for i in `ls *.trs` ; do - grep ':test-result: PASS' $i > /dev/null - if [ $? -eq 1 ] ; then - log=`echo $i | sed 's/\.trs$/\.log/'` - echo "***** $log" - cat $log - fi - done - cd $CWD -fi -- cgit v1.2.3-55-g6feb