Home | History | Annotate | Line # | Download | only in workflows
      1 name: CI-unix
      2 
      3 on:
      4   pull_request:
      5     paths:
      6       - '**'
      7       - '!docs/**'
      8       - '!src/win/**'
      9       - '!.**'
     10       - '.github/workflows/CI-unix.yml'
     11   push:
     12     branches:
     13       - v[0-9].*
     14       - master
     15 
     16 jobs:
     17   build-android:
     18     runs-on: ubuntu-latest
     19     container: reactnativecommunity/react-native-android:2020-5-20
     20     steps:
     21       - uses: actions/checkout@v2
     22       - name: Envinfo
     23         run: npx envinfo
     24       - name: Configure android arm64
     25         # see build options you can use in https://developer.android.com/ndk/guides/cmake
     26         run: |
     27           mkdir build
     28           cd build
     29           $ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_HOME/ndk/20.0.5594570/build/cmake/android.toolchain.cmake -DCMAKE_BUILD_TYPE=Release -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-24 ..
     30       - name: Build android arm64
     31         run: |
     32           $ANDROID_HOME/cmake/3.10.2.4988404/bin/cmake --build build
     33           ls -lh build
     34 
     35   build-macos:
     36     runs-on: macos-10.15
     37     steps:
     38       - uses: actions/checkout@v2
     39       - name: Envinfo
     40         run: npx envinfo
     41       - name: Setup
     42         run: |
     43           brew install ninja
     44       - name: Configure
     45         run: |
     46           mkdir build
     47           cd build
     48           cmake .. -DBUILD_TESTING=ON -G Ninja
     49       - name: Build
     50         run: |
     51           cmake --build build
     52           ls -lh
     53       - name: platform_output
     54         run: |
     55           ./build/uv_run_tests platform_output
     56       - name: platform_output_a
     57         run: |
     58           ./build/uv_run_tests_a platform_output
     59       - name: Test
     60         run: |
     61           cd build && ctest -V
     62 
     63   build-ios:
     64     runs-on: macos-10.15
     65     steps:
     66       - uses: actions/checkout@v2
     67       - name: Configure
     68         run: |
     69           mkdir build-ios
     70           cd build-ios
     71           cmake .. -GXcode -DCMAKE_SYSTEM_NAME:STRING=iOS -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED:BOOL=NO -DCMAKE_CONFIGURATION_TYPES:STRING=Release
     72       - name: Build
     73         run: |
     74           cmake --build build-ios
     75           ls -lh build-ios
     76 
     77   build-cross-qemu:
     78     runs-on: ubuntu-latest
     79     name: build-cross-qemu-${{ matrix.config.target }}
     80 
     81     strategy:
     82       fail-fast: false
     83       matrix:
     84         config:
     85           - {target: arm,     toolchain: gcc-arm-linux-gnueabi,     cc: arm-linux-gnueabi-gcc,      qemu: qemu-arm-static     }
     86           - {target: armhf,   toolchain: gcc-arm-linux-gnueabihf,   cc: arm-linux-gnueabihf-gcc,    qemu: qemu-arm-static     }
     87           - {target: aarch64, toolchain: gcc-aarch64-linux-gnu,     cc: aarch64-linux-gnu-gcc,      qemu: qemu-aarch64-static }
     88           - {target: riscv64, toolchain: gcc-riscv64-linux-gnu,     cc: riscv64-linux-gnu-gcc,      qemu: qemu-riscv64-static }
     89           - {target: ppc,     toolchain: gcc-powerpc-linux-gnu,     cc: powerpc-linux-gnu-gcc,      qemu: qemu-ppc-static     }
     90           - {target: ppc64,   toolchain: gcc-powerpc64-linux-gnu,   cc: powerpc64-linux-gnu-gcc,    qemu: qemu-ppc64-static   }
     91           - {target: ppc64le, toolchain: gcc-powerpc64le-linux-gnu, cc: powerpc64le-linux-gnu-gcc,  qemu: qemu-ppc64le-static }
     92           - {target: s390x,   toolchain: gcc-s390x-linux-gnu,       cc: s390x-linux-gnu-gcc,        qemu: qemu-s390x-static   }
     93           - {target: mips,    toolchain: gcc-mips-linux-gnu,          cc: mips-linux-gnu-gcc,         qemu: qemu-mips-static     }
     94           - {target: mips64,  toolchain: gcc-mips64-linux-gnuabi64,   cc: mips64-linux-gnuabi64-gcc,  qemu: qemu-mips64-static   }
     95           - {target: mipsel,  toolchain: gcc-mipsel-linux-gnu,        cc: mipsel-linux-gnu-gcc,       qemu: qemu-mipsel-static   }
     96           - {target: mips64el,toolchain: gcc-mips64el-linux-gnuabi64, cc: mips64el-linux-gnuabi64-gcc,qemu: qemu-mips64el-static }
     97           - {target: alpha,   toolchain: gcc-alpha-linux-gnu,       cc: alpha-linux-gnu-gcc,        qemu: qemu-alpha-static   }
     98           - {target: arm (u64 slots),     toolchain: gcc-arm-linux-gnueabi,     cc: arm-linux-gnueabi-gcc,      qemu: qemu-arm-static}
     99           - {target: aarch64 (u64 slots), toolchain: gcc-aarch64-linux-gnu,     cc: aarch64-linux-gnu-gcc,      qemu: qemu-aarch64-static}
    100           - {target: ppc (u64 slots),     toolchain: gcc-powerpc-linux-gnu,     cc: powerpc-linux-gnu-gcc,      qemu: qemu-ppc-static}
    101           - {target: ppc64 (u64 slots),   toolchain: gcc-powerpc64-linux-gnu,   cc: powerpc64-linux-gnu-gcc,    qemu: qemu-ppc64-static}
    102 
    103     steps:
    104       - uses: actions/checkout@v2
    105       - name: Install QEMU
    106         # this ensure install latest qemu on ubuntu, apt get version is old
    107         env:
    108           QEMU_SRC: "http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu"
    109           QEMU_VER: "qemu-user-static_4\\.2-.*_amd64.deb$"
    110         run: |
    111           DEB=`curl -s $QEMU_SRC/ | grep -o -E 'href="([^"#]+)"' | cut -d'"' -f2 | grep $QEMU_VER | tail -1`
    112           wget $QEMU_SRC/$DEB
    113           sudo dpkg -i $DEB
    114       - name: Install ${{ matrix.config.toolchain }}
    115         run: |
    116           sudo apt update
    117           sudo apt install ${{ matrix.config.toolchain }} -y
    118       - name: Configure with ${{ matrix.config.cc }}
    119         run: |
    120           mkdir build
    121           cd build
    122           cmake .. -DBUILD_TESTING=ON -DQEMU=ON -DCMAKE_C_COMPILER=${{ matrix.config.cc }}
    123       - name: Build
    124         run: |
    125           cmake --build build
    126           ls -lh build
    127       - name: Test
    128         run: |
    129           ${{ matrix.config.qemu }} build/uv_run_tests_a
    130