Use OpenSSL for TLS #1053
Workflow file for this run
This file contains 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: Rust CI | |
on: | |
pull_request: | |
push: | |
branches: ['main'] | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: read | |
jobs: | |
format: | |
runs-on: client-sdk-linux-medium | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: 'recursive' | |
- name: Add `rustfmt` to toolchain | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
. $HOME/.cargo/env | |
rustup +nightly component add rustfmt | |
- name: Format | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
. $HOME/.cargo/env | |
cargo +nightly fmt --check | |
check: | |
runs-on: client-sdk-linux-medium | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Setup NodeJS | |
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
with: | |
node-version: 18 | |
- name: Setup GCC and OpenSSL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev libssl-dev pkg-config openssl | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: 'recursive' | |
- name: Rust Cache | |
uses: step-security/rust-cache@4a4b9a2f9eb217cd407631bffeef450974ded46a # v2.7.4 | |
with: | |
workspaces: | | |
sdk/rust | |
- name: Install pkg-config and Protoc | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pkg-config | |
- name: Install Protoc | |
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
. $HOME/.cargo/env | |
cargo check --examples --workspace | |
test: | |
needs: ['check'] | |
runs-on: client-sdk-linux-medium | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Setup NodeJS | |
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 | |
with: | |
node-version: 18 | |
- name: Setup GCC and OpenSSL | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends gcc libc6-dev libc-dev libssl-dev pkg-config openssl | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: 'recursive' | |
- name: Rust Cache | |
uses: step-security/rust-cache@4a4b9a2f9eb217cd407631bffeef450974ded46a # v2.7.4 | |
with: | |
workspaces: | | |
. | |
- name: Install Protoc | |
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Start the local node | |
run: npx @hashgraph/hedera-local start -d --network local --network-tag=0.57.0 | |
- name: "Create env file" | |
run: | | |
touch .env | |
echo TEST_OPERATOR_KEY="302e020100300506032b657004220420a608e2130a0a3cb34f86e757303c862bee353d9ab77ba4387ec084f881d420d4" >> .env | |
echo TEST_OPERATOR_ID="0.0.1022" >> .env | |
echo TEST_NETWORK_NAME="localhost" >> .env | |
echo TEST_RUN_NONFREE="1" >> .env | |
cat .env | |
- name: Test | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
. $HOME/.cargo/env | |
cargo test --workspace | |
- name: Stop the local node | |
run: npx @hashgraph/hedera-local stop |