Bump tokio from 1.46.0 to 1.46.1 (#173) #708
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: build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: "3.21.2" | |
- name: Install rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: 1.88.0 | |
components: rustfmt, clippy | |
- name: Run cargo check | |
run: cargo check | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: cargo clippy -- -D warnings | |
- name: run cmake | |
run: > | |
cmake . -DCMAKE_BUILD_TYPE=Debug -B build | |
- name: run build | |
run: cmake --build build --config Debug | |
# mysql bin has conflicting dlls with fabric than prevents fabric from starting | |
- name: Remove conflict dll paths | |
shell: powershell | |
run: | | |
get-command libprotobuf.dll | format-list | |
Remove-Item -Recurse -Force "C:\Program Files\MySQL\MySQL Server 8.0\bin" | |
- name: check sf exist | |
run: Powershell.exe -File .\scripts\check_sf_installed.ps1 | |
# Creates a 5 node dev cluster | |
- name: start sf cluster | |
run: Powershell.exe -File "C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup\DevClusterSetup.ps1" | |
- name: start connection | |
run: Powershell.exe -File .\scripts\check_cluster_online.ps1 | |
- name: provision apps and run tests | |
shell: powershell | |
run: | | |
# The test will add and remove app | |
.\tests\echo_script_test.ps1 | |
.\scripts\echomain_stateful_ctl2.ps1 -Action Add | |
.\scripts\echomain_ctl.ps1 -Action Add | |
- name: Run cargo test | |
run: cargo test --all -- --nocapture | |
build-u20: | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:20.04 | |
options: --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install sudo | |
run: | | |
apt-get update | |
apt-get install -y sudo | |
- name: apt-get | |
run: | | |
sudo apt-get update | |
sudo apt-get install apt-transport-https curl lsb-release wget gnupg2 software-properties-common debconf-utils clang unzip -y | |
- name: install sf | |
run: | | |
wget -q https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb; | |
sudo dpkg -i packages-microsoft-prod.deb; | |
curl -fsSL https://packages.microsoft.com/keys/msopentech.asc | sudo apt-key add - ; | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - ; | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" ; | |
sudo apt-get update; | |
echo "servicefabric servicefabric/accepted-eula-ga select true" | sudo debconf-set-selections ; | |
echo "servicefabricsdkcommon servicefabricsdkcommon/accepted-eula-ga select true" | sudo debconf-set-selections ; | |
sudo apt-get install servicefabricsdkcommon -y; | |
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/microsoft/servicefabric/bin/Fabric/Fabric.Code" >> $GITHUB_ENV | |
- uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: "3.21.2" | |
- name: Install rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: 1.88.0 | |
components: rustfmt, clippy | |
- name: Run cargo check | |
run: cargo check | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: cargo clippy -- -D warnings | |
- name: run cmake | |
run: > | |
cmake . -DCMAKE_BUILD_TYPE=Debug -B build | |
- name: run build | |
run: cmake --build build --config Debug | |
- name: install sfctl | |
run: | | |
sudo apt-get install python3-pip -y | |
python3 -m pip install --upgrade pip | |
pip3 install -I sfctl==11.1.0 | |
echo "~/.local/bin" >> $GITHUB_PATH | |
- name: test sfctl | |
run: sfctl --version | |
# Do not run test because SF onebox is not supported on azl3 yet. | |
build-azl3: | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/azurelinux/base/core:3.0 | |
options: --privileged | |
steps: | |
- name: tdnf install | |
run: | | |
tdnf update --noplugins --skipsignature -y | |
tdnf install --noplugins --skipsignature -y tar unzip ca-certificates gcc glibc-devel binutils make | |
- uses: actions/checkout@v4 | |
- uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: "3.21.2" | |
- name: Install rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: 1.88.0 | |
components: rustfmt, clippy | |
- name: Run cargo check | |
run: cargo check | |
- name: Run cargo fmt | |
run: cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: cargo clippy -- -D warnings | |
- name: run cmake | |
run: > | |
cmake . -DCMAKE_BUILD_TYPE=Debug -B build | |
- name: run build | |
run: cmake --build build --config Debug | |
build-devcontainer: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Run in Dev Container | |
uses: devcontainers/[email protected] | |
with: | |
runCmd: | | |
cmake . -DCMAKE_BUILD_TYPE=Debug -B build | |
cmake --build build --config Debug | |
set +e # do not exit on error | |
counter=0 | |
COMMAND_STATUS=1 | |
until [ $COMMAND_STATUS -eq 0 ]; do | |
echo "attempt #${counter}" | |
sfctl cluster select | |
COMMAND_STATUS=$? | |
sleep 1 | |
let counter=counter+1 | |
if [[ $counter -eq 10 ]] ; | |
then | |
echo "Retry max reached" && exit 1 | |
fi | |
done | |
sfctl cluster health | |
sleep 10 # wait for cluster to be up | |
echo "Uploading applications" | |
sfctl application upload --path build/echoapp_root | |
sfctl application provision --application-type-build-path echoapp_root | |
sfctl application create --app-name fabric:/EchoApp --app-type EchoApp --app-version 0.0.1 | |
sfctl application upload --path build/echoapp_root_stateful2 | |
sfctl application provision --application-type-build-path echoapp_root_stateful2 | |
sfctl application create --app-name fabric:/StatefulEchoApp --app-type StatefulEchoApp --app-version 0.0.1 | |
sleep 10 # wait for services to be up | |
echo "Resolving services" | |
sfctl service resolve --service-id EchoApp/EchoAppService | |
sfctl service resolve --service-id StatefulEchoApp/StatefulEchoAppService | |
echo "Running tests" | |
cargo test --all -- --nocapture |