Skip to content

Merge pull request #286 from adfinis-forks/ci/harden-shell-interpolation #498

Merge pull request #286 from adfinis-forks/ci/harden-shell-interpolation

Merge pull request #286 from adfinis-forks/ci/harden-shell-interpolation #498

Workflow file for this run

name: "SDKs"
# Runs every language SDK's full test suite (unit + cross-language conformance +
# the schema/quicktype codegen pipeline) against a freshly built cdylib, so the
# Python/Go/Ruby/Node/Haskell/C#/PHP/Swift bindings cannot silently rot.
on:
workflow_call:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
sdks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# The full workspace debug build (AWS/GCP/Bitwarden providers) plus the
# Nix store overflows the ~14GB free on a hosted runner.
# /usr/share/dotnet is safe to purge: the C# suite uses devenv's dotnet.
- name: Free up disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android \
/opt/hostedtoolcache/CodeQL /usr/local/.ghcup /opt/ghc \
/usr/local/share/boost /usr/local/share/powershell
sudo docker image prune --all --force
df -h /
- uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0
- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- name: Build cdylib and run all SDK suites
run: devenv shell -- bash scripts/ci-sdks.sh
swift:
name: Swift SDK
runs-on: macos-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Rust (pinned by rust-toolchain.toml)
run: rustup toolchain install
- name: Build the native resolver
env:
MACOSX_DEPLOYMENT_TARGET: "12.0"
run: cargo build -p secretspec-ffi
- name: Build the local XCFramework
run: >-
bash scripts/build-swift-xcframework.sh
secretspec-swift/Artifacts/CSecretSpec.xcframework
target/debug/libsecretspec_ffi.dylib
- name: Run the Swift SDK and conformance tests
run: |
swift test --parallel
swift test --filter SecretSpecTests.testCrossLanguageConformance