Skip to content

Commit

Permalink
Test wasm32-unknown-unknown in Azure Pipelines (#1903)
Browse files Browse the repository at this point in the history
* Test wasm32-unknown-unknown in Azure Pipelines

Also gets rid of most of GitHub Actions with only E2E tests remaining.

* Remove GitHub Actions and disable non-functioning e2e testing

* Do not check all features, targets for wasm32

* Resolve PR feedback
  • Loading branch information
heaths authored Nov 8, 2024
1 parent 54db2ca commit d7137b0
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 257 deletions.
143 changes: 0 additions & 143 deletions .github/workflows/build.yml

This file was deleted.

12 changes: 11 additions & 1 deletion eng/scripts/Analyze-Code.ps1
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#Requires -Version 7.0
#!/usr/bin/env pwsh

#Requires -Version 7.0
param(
[string]$Toolchain = 'stable',
[string]$PackageInfoPath,
[switch]$CheckWasm = $true,
[switch]$SkipPackageAnalysis
)

Expand All @@ -18,12 +20,20 @@ Write-Host "Analyzing code with
$env:RUSTDOCFLAGS = "-D warnings"
$env:RUSTFLAGS = "-Dwarnings"

if ($CheckWasm) {
Invoke-LoggedCommand "rustup target add --toolchain $Toolchain wasm32-unknown-unknown"
}

Invoke-LoggedCommand "cargo +$Toolchain check -p azure_core --all-features --all-targets --keep-going"

Invoke-LoggedCommand "cargo +$Toolchain fmt --all -- --check"

Invoke-LoggedCommand "cargo +$Toolchain clippy --workspace --all-features --all-targets --keep-going --no-deps"

if ($CheckWasm) {
Invoke-LoggedCommand "cargo +$Toolchain clippy --target=wasm32-unknown-unknown --workspace --keep-going --no-deps"
}

Invoke-LoggedCommand "cargo +$Toolchain doc --workspace --no-deps"

# Verify package dependencies
Expand Down
11 changes: 6 additions & 5 deletions eng/scripts/Test-Packages.ps1
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Requires -Version 7.0
#!/usr/bin/env pwsh

#Requires -Version 7.0
param(
[string]$Toolchain = 'stable',
[bool]$UnitTests = $true,
Expand Down Expand Up @@ -30,22 +31,22 @@ if ($PackageInfoPath) {
| ConvertFrom-Json
}
else {
$packagesToTest = Get-AllPackagesInRepo
$packagesToTest = Get-AllPackageInfoFromRepo
}

Write-Host "Testing packages:"
foreach ($package in $packagesToTest) {
Write-Host " '$($package.Name)'"
Write-Host " '$($package.Name)' in '$($package.DirectoryPath)'"
}

Write-Host "Setting RUSTFLAGS to '-Dwarnings'"
$env:RUSTFLAGS = "-Dwarnings"


foreach ($package in $packagesToTest) {
Push-Location (Join-Path $RepoRoot $package.DirectoryPath)
Push-Location ([System.IO.Path]::Combine($RepoRoot, $package.DirectoryPath))
try {
Write-Host "`n`nTesting package: '$($package.Name)' in directory: '$($package.DirectoryPath)'`n"
Write-Host "`n`nTesting package: '$($package.Name)'`n"

Invoke-LoggedCommand "cargo +$Toolchain build --keep-going"
Write-Host "`n`n"
Expand Down
10 changes: 0 additions & 10 deletions eng/scripts/all_tests.sh

This file was deleted.

14 changes: 0 additions & 14 deletions eng/scripts/check_wasm.sh

This file was deleted.

17 changes: 0 additions & 17 deletions eng/scripts/e2e_tests.sh

This file was deleted.

50 changes: 0 additions & 50 deletions eng/scripts/emulator_tests.sh

This file was deleted.

14 changes: 0 additions & 14 deletions eng/scripts/sdk_tests.sh

This file was deleted.

1 change: 0 additions & 1 deletion sdk/core/azure_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ reqwest_gzip = ["typespec_client_core/reqwest_gzip"]
reqwest_rustls = ["typespec_client_core/reqwest_rustls"]
hmac_rust = ["dep:sha2", "dep:hmac"]
hmac_openssl = ["dep:openssl"]
test_e2e = []
azurite_workaround = []
xml = ["typespec_client_core/xml"]
tokio_fs = ["typespec_client_core/tokio_fs"]
Expand Down
1 change: 0 additions & 1 deletion sdk/core/azure_core_amqp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ fe2o3-amqp = [
"serde_bytes",
]
cplusplus = []
test_e2e = []

[package.metadata.docs.rs]
features = ["fe2o3-amqp"]
1 change: 0 additions & 1 deletion sdk/identity/azure_identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ clap.workspace = true
default = ["reqwest", "old_azure_cli"]
reqwest = ["azure_core/reqwest"]
reqwest_rustls = ["azure_core/reqwest_rustls"]
test_e2e = []
client_certificate = ["openssl"]

# If you are using and Azure CLI version older than 2.54.0 from November 2023,
Expand Down

0 comments on commit d7137b0

Please sign in to comment.