chore(deps): bump the all-actions group with 6 updates #825
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Indy-VDR" | |
| env: | |
| RUST_VERSION: "1.85.0" | |
| CROSS_VERSION: "0.2.5" | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| inputs: | |
| publish-binaries: | |
| description: "Publish Binaries to Release (will create a release if no release exits for branch or tag)" | |
| required: true | |
| default: false | |
| type: boolean | |
| publish-python-wrapper: | |
| description: "Publish Python Wrapper to Registries" | |
| required: true | |
| default: false | |
| type: boolean | |
| publish-javascript-wrapper: | |
| description: "Publish JavaScript Wrapper to Registries" | |
| required: true | |
| default: false | |
| type: boolean | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| actions: write | |
| contents: write | |
| jobs: | |
| checks: | |
| name: Run checks | |
| strategy: | |
| matrix: | |
| os: [macos-14, windows-latest, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| components: clippy, rustfmt | |
| - name: Cache cargo resources | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: deps | |
| cache-on-failure: true | |
| - name: Cargo check | |
| run: cargo check | |
| - name: Cargo check TLS support | |
| run: cargo check --package indy-vdr-proxy --features tls | |
| - name: Cargo fmt | |
| run: cargo fmt --all -- --check | |
| - if: ${{ runner.os == 'Linux' }} | |
| name: Pre-install cross | |
| run: | | |
| cargo install --bins --git https://github.com/rust-embedded/cross --locked --tag v${{ env.CROSS_VERSION }} cross | |
| test-suite: | |
| name: Run Test Suite | |
| needs: [checks] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| - name: Cache cargo resources | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: deps | |
| save-if: false | |
| - name: Debug build | |
| run: cargo build --manifest-path libindy_vdr/Cargo.toml | |
| - name: Run local node pool | |
| run: | | |
| ./ci/test.sh up | |
| - name: Run tests | |
| run: cargo test --manifest-path libindy_vdr/Cargo.toml --features local_nodes_pool | |
| - name: Stop local node pool | |
| run: | | |
| ./ci/test.sh down | |
| build-release: | |
| name: Build library | |
| needs: [checks] | |
| strategy: | |
| matrix: | |
| include: | |
| - architecture: linux-aarch64 | |
| os: ubuntu-latest | |
| lib: libindy_vdr.so | |
| target: aarch64-unknown-linux-gnu | |
| use_cross: true | |
| - architecture: linux-x86_64 | |
| os: ubuntu-latest | |
| lib: libindy_vdr.so | |
| target: x86_64-unknown-linux-gnu | |
| # using cross here to build against an older glibc for compatibility | |
| use_cross: true | |
| - architecture: darwin-universal | |
| os: macos-14 | |
| lib: libindy_vdr.dylib | |
| target: darwin-universal | |
| # As of Rust 1.80, aarch64-apple-darwin is stable | |
| toolchain: stable | |
| - architecture: windows-x86_64 | |
| os: windows-latest | |
| lib: indy_vdr.dll | |
| target: x86_64-pc-windows-msvc | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.toolchain || env.RUST_VERSION }} | |
| - name: Cache cargo resources | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: deps | |
| save-if: false | |
| - if: ${{ matrix.use_cross }} | |
| name: Build (cross) | |
| run: | | |
| cargo install --bins --git https://github.com/rust-embedded/cross --locked --tag v${{ env.CROSS_VERSION }} cross | |
| cross build --lib --release --target ${{ matrix.target }} | |
| - if: ${{ !matrix.use_cross && matrix.architecture == 'darwin-universal' }} | |
| name: Build (mac) | |
| run: ./build-universal.sh | |
| # Requires using the default shell on Windows, otherwise it will complain: | |
| # "This perl implementation doesn't produce Windows like paths" | |
| - if: ${{ !matrix.use_cross && matrix.architecture != 'darwin-universal' }} | |
| name: Build (standard) | |
| run: | | |
| cargo build --lib --release --target ${{ matrix.target }} | |
| - name: Upload library artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: library-${{ matrix.architecture }} | |
| path: target/${{ matrix.target }}/release/${{ matrix.lib }} | |
| - name: Create library artifacts directory | |
| if: | | |
| github.event_name == 'release' || | |
| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true') | |
| run: | | |
| mkdir release-artifacts | |
| cp target/${{ matrix.target }}/release/${{ matrix.lib }} release-artifacts/ | |
| - uses: a7ul/[email protected] | |
| if: | | |
| github.event_name == 'release' || | |
| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true') | |
| with: | |
| command: c | |
| cwd: release-artifacts | |
| files: . | |
| outPath: "library-${{ matrix.architecture }}.tar.gz" | |
| - name: Add library artifacts to release | |
| if: | | |
| github.event_name == 'release' || | |
| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-binaries == 'true') | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| file: library-${{ matrix.architecture }}.tar.gz | |
| asset_name: "library-${{ matrix.architecture }}.tar.gz" | |
| build-golang: | |
| name: Build and Test Go wrapper | |
| needs: [build-release] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: "Use Golang 1.16.x+" | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "^1.16.0" | |
| - name: Fetch library artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: library-linux-x86_64 | |
| - name: Build and test wrapper | |
| run: | | |
| sudo cp libindy_vdr.so /usr/lib/ | |
| cd wrappers/golang | |
| go run cmd/demo/demo.go | |
| build-javascript: | |
| name: Build and Test JavaScript wrapper | |
| needs: [build-release] | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: wrappers/javascript | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.JS 20.x | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20.x | |
| registry-url: "https://registry.npmjs.org/" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Set Yarn version to 4 | |
| run: yarn set version 4.9.2 | |
| - name: Fetch library artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: library-linux-x86_64 | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Build | |
| run: yarn build | |
| - name: Lint | |
| run: yarn lint | |
| - name: Check format | |
| run: yarn check-format | |
| - name: Check types | |
| run: yarn check-types | |
| - name: Run local node pool | |
| run: | | |
| cd ../../ | |
| docker build -f ci/indy-pool.dockerfile -t test_pool --build-arg pool_ip=10.0.0.2 ci | |
| docker network create --subnet=10.0.0.0/8 indy-sdk-network | |
| docker run -d --name indy_pool -p 9701-9708:9701-9708 --net=indy-sdk-network test_pool | |
| cd wrappers/javascript | |
| docker exec $(docker ps -aqf "ancestor=test_pool") cat /var/lib/indy/sandbox/pool_transactions_genesis >> genesis.txn | |
| - name: Run tests | |
| env: | |
| # binary is downloaded to root of repository | |
| LIB_INDY_VDR_PATH: ../../../ | |
| run: yarn test | |
| - name: Publish JavaScript Wrapper | |
| if: | | |
| github.event_name == 'release' || | |
| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-javascript-wrapper == 'true') | |
| run: | | |
| if [[ $(cat lerna.json | grep version | head -1 | grep dev) ]]; then | |
| npx lerna publish from-package --no-push --no-private --yes --no-git-tag-version --dist-tag=alpha | |
| else | |
| npx lerna publish from-package --no-push --no-private --yes --no-git-tag-version | |
| fi | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| build-ios: | |
| name: Build library (iOS) | |
| needs: [checks] | |
| runs-on: macos-14 | |
| strategy: | |
| matrix: | |
| target: [aarch64-apple-ios, aarch64-apple-ios-sim, x86_64-apple-ios] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| targets: ${{ matrix.target }} | |
| - name: Cache cargo resources | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: deps | |
| save-if: false | |
| - name: Build | |
| run: | | |
| # Set RUSTFLAGS to cap lints at warning level to prevent warnings from becoming errors | |
| export RUSTFLAGS="--cap-lints=warn" | |
| # Set iOS deployment target to align with RN 0.77+ requirement (iOS 15.1+) | |
| export IPHONEOS_DEPLOYMENT_TARGET=12.0 | |
| export CMAKE_OSX_DEPLOYMENT_TARGET=12.0 | |
| # For iOS simulator, use the simulator SDK | |
| if [[ "${{ matrix.target }}" == *"sim"* ]]; then | |
| export CMAKE_OSX_SYSROOT=$(xcrun --sdk iphonesimulator --show-sdk-path) | |
| else | |
| export CMAKE_OSX_SYSROOT=$(xcrun --sdk iphoneos --show-sdk-path) | |
| fi | |
| # Force ZMQ to use the correct compiler for iOS | |
| export CC=$(xcrun --find clang) | |
| export CXX=$(xcrun --find clang++) | |
| cargo build --lib --release --target ${{ matrix.target }} --package indy-vdr | |
| - name: List files in target | |
| run: | | |
| ls -la target/${{ matrix.target }}/release/ | |
| - name: Save library | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: library-${{ matrix.target}} | |
| path: target/${{ matrix.target }}/release/libindy_vdr.a | |
| create-ios-xcframework: | |
| name: Create iOS xcframework | |
| runs-on: macos-14 | |
| needs: build-ios | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Fetch static libraries | |
| uses: actions/download-artifact@v7 | |
| - name: Debug - List downloaded files | |
| run: find . -name "*.a" | sort | |
| - name: Debug - Show directory structure | |
| run: | | |
| ls -la | |
| ls -la library-aarch64-apple-ios | |
| ls -la library-aarch64-apple-ios-sim | |
| ls -la library-x86_64-apple-ios | |
| - run: > | |
| ./build-xcframework.sh library-aarch64-apple-ios \ | |
| library-aarch64-apple-ios-sim \ | |
| library-x86_64-apple-ios | |
| - name: Save xcframework | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: indy_vdr.xcframework | |
| path: ./out | |
| - uses: geekyeggo/delete-artifact@v5 | |
| with: | |
| name: | | |
| library-aarch64-apple-ios | |
| library-aarch64-apple-ios-sim | |
| library-x86_64-apple-ios | |
| failOnError: false | |
| build-android: | |
| name: Build library (Android) | |
| needs: [checks] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| target: | |
| [ | |
| aarch64-linux-android, | |
| armv7-linux-androideabi, | |
| i686-linux-android, | |
| x86_64-linux-android, | |
| ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ env.RUST_VERSION }} | |
| targets: ${{ matrix.target }} | |
| - name: Cache cargo resources | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: deps | |
| save-if: false | |
| - name: Build | |
| run: | | |
| cargo install --bins --git https://github.com/rust-embedded/cross --locked --tag v${{ env.CROSS_VERSION }} cross | |
| # Using default Cross images since custom ones were removed from Cross.toml | |
| cross build --lib --release --target ${{matrix.target}} --package indy-vdr | |
| - name: Save library | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: library-${{matrix.target}} | |
| path: target/${{ matrix.target }}/release/libindy_vdr.so | |
| create-android-library: | |
| name: Create library (Android) | |
| runs-on: ubuntu-latest | |
| needs: build-android | |
| steps: | |
| - name: Fetch libraries | |
| uses: actions/download-artifact@v7 | |
| - run: | | |
| sudo mkdir ./libs | |
| sudo mv library-aarch64-linux-android ./libs/arm64-v8a | |
| sudo mv library-armv7-linux-androideabi ./libs/armeabi-v7a | |
| sudo mv library-i686-linux-android ./libs/x86 | |
| sudo mv library-x86_64-linux-android ./libs/x86_64 | |
| - name: Save Android library | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: android-libraries | |
| path: ./libs | |
| - uses: geekyeggo/delete-artifact@v5 | |
| with: | |
| name: | | |
| library-aarch64-linux-android | |
| library-armv7-linux-androideabi | |
| library-i686-linux-android | |
| library-x86_64-linux-android | |
| failOnError: false | |
| create-ios-android-release-asset: | |
| name: Create iOS and Android release assets | |
| runs-on: ubuntu-latest | |
| needs: | |
| - create-ios-xcframework | |
| - create-android-library | |
| if: | | |
| (github.event_name == 'release' || | |
| (github.event_name == 'workflow_dispatch' && | |
| github.event.inputs.publish-binaries == 'true')) | |
| steps: | |
| - name: Fetch Android libraries | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: android-libraries | |
| path: mobile/android/ | |
| - name: Fetch iOS Framework | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: indy_vdr.xcframework | |
| path: mobile/ios/ | |
| - uses: a7ul/[email protected] | |
| with: | |
| command: c | |
| files: ./mobile | |
| outPath: "library-ios-android.tar.gz" | |
| - name: Add library artifacts to release | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| file: library-ios-android.tar.gz | |
| asset_name: "library-ios-android.tar.gz" | |
| build-py: | |
| name: Build and test Python wrapper | |
| needs: [build-release] | |
| strategy: | |
| matrix: | |
| architecture: | |
| [linux-aarch64, linux-x86_64, darwin-universal, windows-x86_64] | |
| python-version: ["3.8"] | |
| include: | |
| - os: ubuntu-latest | |
| architecture: linux-aarch64 | |
| plat-name: manylinux2014_aarch64 | |
| - os: ubuntu-latest | |
| architecture: linux-x86_64 | |
| plat-name: manylinux2014_x86_64 | |
| - os: macos-14 | |
| architecture: darwin-universal | |
| plat-name: macosx_14_0_universal2 | |
| - os: windows-latest | |
| architecture: windows-x86_64 | |
| plat-name: win_amd64 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install setuptools wheel twine auditwheel | |
| - name: Fetch library artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: library-${{ matrix.architecture }} | |
| path: wrappers/python/indy_vdr/ | |
| - name: Build python package | |
| shell: sh | |
| run: | | |
| python setup.py bdist_wheel --python-tag=py3 --plat-name=${{ matrix.plat-name }} | |
| working-directory: wrappers/python | |
| - name: Test python package | |
| if: ${{ matrix.architecture != 'linux-aarch64' }} | |
| shell: sh | |
| run: | | |
| pip install dist/* | |
| python -m demo.test | |
| working-directory: wrappers/python | |
| - if: ${{ runner.os == 'Linux' }} | |
| name: Audit wheel | |
| run: | | |
| auditwheel show wrappers/python/dist/* | tee auditwheel.log | |
| grep -q manylinux_2_17_ auditwheel.log | |
| - name: Upload python package | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: python-${{ matrix.architecture }} | |
| path: wrappers/python/dist/* | |
| - if: | | |
| github.event_name == 'release' || | |
| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-python-wrapper == 'true') | |
| name: Publish python package | |
| env: | |
| TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
| TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
| run: | | |
| twine upload --skip-existing dist/* | |
| working-directory: wrappers/python |