Skip to content

Update compiler versions in CI #899

Update compiler versions in CI

Update compiler versions in CI #899

Workflow file for this run

name: ci
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
SSI_REF: main
RUSTFLAGS: "-Dwarnings"
defaults:
run:
working-directory: didkit
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout DIDKit repository
uses: actions/checkout@v3
with:
path: didkit
submodules: true
- name: Checkout SSI library
uses: actions/checkout@v3
with:
repository: spruceid/ssi
path: ssi
ref: ${{env.SSI_REF}}
submodules: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
didkit
- name: Install Rust old stable with incremental compilation
uses: actions-rs/toolchain@v1
with:
toolchain: 1.70.0
profile: minimal
default: true
- name: Build
run: cargo build
- name: Test
run: cargo test
- name: Test CLI
run: cli/tests/example.sh
- name: Test CLI with ssh-agent
run: cli/tests/ssh-agent.sh
- name: Test CLI (did:tz)
env:
DID_METHOD: tz
run: cli/tests/example.sh
- name: Test CLI (JWT)
env:
PROOF_FORMAT: jwt
run: cli/tests/example.sh
- name: Test CLI (JWT VC in LDP VP)
env:
VC_PROOF_FORMAT: jwt
run: cli/tests/example.sh
- name: Test CLI (LDP VC in JWT VP)
env:
VP_PROOF_FORMAT: jwt
run: cli/tests/example.sh
- name: Test binary-signing verify example
run: examples/binary-signing/index.sh verify examples/binary-signing/hello.txt examples/binary-signing/hello-vc.jsonld
- name: Install wasm-pack
run: make -C lib install-wasm-pack
- name: Use system JDK
run: echo "$JAVA_HOME/bin" >> $GITHUB_PATH
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'dev'
- name: Opt out of Dart/Flutter analytics
run: |
dart --disable-analytics
flutter --suppress-analytics config --no-analytics
- name: Test C FFI
run: make -C lib ../target/test/c.stamp
- name: Test WASM package
run: make -C lib ../target/test/wasm.stamp
- name: Test JNI
run: make -C lib ../target/test/java.stamp
- name: Test Dart/Flutter plugin
run: make -C lib ../target/test/flutter.stamp
- name: Install Rust Android target
run: rustup target add i686-linux-android
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install NDK
run: sdkmanager --install "build-tools;33.0.2" "ndk;25.2.9519653" "cmdline-tools;latest"
- name: Install gcc-multilib
run: |
sudo apt update
sudo apt install gcc-multilib -y
- name: Build Android Archive
# run: AR_i686_linux_android=$ANDROID_SDK_ROOT/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/i686-linux-android/bin/llvm-ar PATH=$ANDROID_SDK_ROOT/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH TARGET_CC=$(which clang) cargo build --lib --target i686-linux-android
run: PATH=$ANDROID_SDK_ROOT/ndk/25.2.9519653/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH TARGET_CC=$(which clang) cargo build --lib --target i686-linux-android
test_http:
runs-on: ubuntu-latest
strategy:
matrix:
# di-ed25519-test-suite fails one test because issuer != proof VM
# did-key-test-suite requires more checks in ssi
# di-eddsa-2022-test-suite passes but currently it's depending on a (npm) git branch that doesn't exist anymore
suite: ["vc-api-issuer-test-suite", "vc-api-verifier-test-suite"] # "di-eddsa-2022-test-suite", "di-ed25519-test-suite", "did-key-test-suite"]
steps:
- name: Checkout DIDKit repository
uses: actions/checkout@v3
with:
path: didkit
submodules: true
- name: Checkout SSI library
uses: actions/checkout@v3
with:
repository: spruceid/ssi
path: ssi
ref: ${{env.SSI_REF}}
submodules: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
didkit
shared-key: "vc-api"
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Start VC API
run: |
cd http
cargo build
DIDKIT_HTTP_ISSUER_KEYS='[{"kty":"OKP","crv":"Ed25519","x":"HvjBEw94RHAh9KkiD385aYZNxGkxIkwBcrLBY5Z7Koo","d":"1onWu34oC29Y09qCRl0aD2FOp5y5obTqHZxQQRT3-bs"}]' cargo run &
- name: Start HTTPS Proxy
run: npx local-ssl-proxy --source 9000 --target 3000 --hostname 127.0.0.1 &
- name: Setup Test Suite
run: |
cd http/tests/${{ matrix.suite }}
npm i
rm node_modules/vc-api-test-suite-implementations/implementations/*.json
ln ../vcApiTestImplementationsConfig.cjs .vcApiTestImplementationsConfig.cjs
- name: Run Test Suite
run: |
cd http/tests/${{ matrix.suite }}
ISSUER_NAME="Spruce" KEY_SEED_DB=z1Aaj5A4UCsdMpXwdYAReXa4bxWYiKJtdAvB1zMzCHtCbtD npm test
build_ios:
runs-on: macos-latest
steps:
- name: Checkout DIDKit repository
uses: actions/checkout@v3
with:
path: didkit
- name: Checkout SSI library
uses: actions/checkout@v3
with:
repository: spruceid/ssi
path: ssi
ref: ${{env.SSI_REF}}
submodules: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
didkit
- name: Install Rust iOS targets
run: make -C lib install-rustup-ios
- name: Build iOS Library
run: make -C lib ../target/test/ios.stamp
build_windows:
runs-on: windows-latest
steps:
- name: Checkout DIDKit repository
uses: actions/checkout@v3
with:
path: didkit
- name: Checkout SSI library
uses: actions/checkout@v3
with:
repository: spruceid/ssi
path: ssi
ref: ${{env.SSI_REF}}
submodules: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
didkit
- name: Build
run: cargo build