| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| |
| name: CI |
| on: [push, pull_request, workflow_dispatch] |
| defaults: |
| run: |
| shell: bash |
| |
| jobs: |
| teaclave-client-sdk-macos: |
| runs-on: macos-latest |
| steps: |
| - uses: actions/checkout@v2 |
| with: |
| submodules: 'true' |
| - name: Install dependencies |
| run: | |
| brew install cmake openssl@1.1 |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
| export PATH=~/.cargo/bin:$PATH |
| rustup default nightly-2020-10-25 && rustup target add aarch64-apple-ios x86_64-apple-ios |
| - name: Building Teaclave Client SDK |
| run: | |
| export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/opt/libssh2/lib/pkgconfig/" |
| export PATH=~/.cargo/bin:$PATH |
| cargo +stable install cargo-lipo |
| cargo build --manifest-path sdk/rust/Cargo.toml |
| cargo build --manifest-path sdk/rust/Cargo.toml --target aarch64-apple-ios |
| cargo lipo --manifest-path sdk/rust/Cargo.toml |
| cd sdk/swift/TeaclaveClientSDK && xcodebuild -scheme TeaclaveClientSDK |
| format: |
| runs-on: ubuntu-20.04 |
| container: teaclave/teaclave-build-ubuntu-1804-sgx-2.14:0.1.5 |
| steps: |
| - uses: actions/checkout@v2 |
| - name: Setting up $HOME |
| run: | |
| cp /root/.bashrc $HOME/.bashrc && |
| ln -sf /root/.rustup ~/.rustup && |
| ln -sf /root/.cargo ~/.cargo |
| - name: Checking code format |
| run: | |
| . /root/.cargo/env && |
| . /opt/sgxsdk/environment && |
| mkdir -p build && cd build && |
| cmake -DRUSTFLAGS="-D warnings" -DTEST_MODE=ON .. && |
| make check |
| lint: |
| runs-on: ubuntu-20.04 |
| container: teaclave/teaclave-build-ubuntu-1804-sgx-2.14:0.1.5 |
| steps: |
| - uses: actions/checkout@v2 |
| - name: Setting up $HOME |
| run: | |
| cp /root/.bashrc $HOME/.bashrc && |
| ln -sf /root/.rustup ~/.rustup && |
| ln -sf /root/.cargo ~/.cargo |
| - name: Code linting with Clippy |
| run: | |
| . /opt/sgxsdk/environment && |
| . /root/.cargo/env && |
| mkdir -p build && cd build && |
| cmake -DRUSTFLAGS="-D warnings" -DTEST_MODE=ON .. && |
| CLP=1 make -j |
| license: |
| runs-on: ubuntu-20.04 |
| steps: |
| - uses: actions/checkout@v2 |
| - name: Check License Header |
| uses: apache/skywalking-eyes@main |