Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,22 @@ jobs:
run: |
# set compiler to cl.exe to avoid building with gcc.
echo "CMAKE_COMPILER_ARGS=-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe" >> $env:GITHUB_ENV
# disable unused network interface
netsh interface set interface name="vEthernet (nat)" admin=DISABLED
# get host IP address
# disable unused network interface (may not exist on windows-2022 runners)
$nat = Get-NetAdapter -Name 'vEthernet (nat)' -ErrorAction SilentlyContinue
if ($nat) {
netsh interface set interface name="vEthernet (nat)" admin=DISABLED
}
# get host IP address (avoid Get-NetIPConfiguration which fails when multiple adapters map to one interface)
$ifIndex = (
Get-NetRoute -DestinationPrefix '0.0.0.0/0' |
Sort-Object RouteMetric |
Select-Object -First 1
).InterfaceIndex
$env:hostip = (
Get-NetIPConfiguration |
Where-Object {
$_.IPv4DefaultGateway -ne $null -and
$_.NetAdapter.Status -ne "Disconnected"
}
).IPv4Address.IPAddress
Get-NetIPAddress -InterfaceIndex $ifIndex -AddressFamily IPv4 |
Where-Object { $_.IPAddress -notlike '169.254.*' } |
Select-Object -First 1
).IPAddress
echo "HOST_IP_ADDRESS=$env:hostip" >> $env:GITHUB_ENV
ipconfig
# add the CRL Distribution Point to hosts so that it's discoverable when running the AMWA test suite in mDNS mode
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/src/build-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,22 @@
run: |
# set compiler to cl.exe to avoid building with gcc.
echo "CMAKE_COMPILER_ARGS=-DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe" >> $env:GITHUB_ENV
# disable unused network interface
netsh interface set interface name="vEthernet (nat)" admin=DISABLED
# get host IP address
# disable unused network interface (may not exist on windows-2022 runners)
$nat = Get-NetAdapter -Name 'vEthernet (nat)' -ErrorAction SilentlyContinue
if ($nat) {
netsh interface set interface name="vEthernet (nat)" admin=DISABLED
}
# get host IP address (avoid Get-NetIPConfiguration which fails when multiple adapters map to one interface)
$ifIndex = (
Get-NetRoute -DestinationPrefix '0.0.0.0/0' |
Sort-Object RouteMetric |
Select-Object -First 1
).InterfaceIndex
$env:hostip = (
Get-NetIPConfiguration |
Where-Object {
$_.IPv4DefaultGateway -ne $null -and
$_.NetAdapter.Status -ne "Disconnected"
}
).IPv4Address.IPAddress
Get-NetIPAddress -InterfaceIndex $ifIndex -AddressFamily IPv4 |
Where-Object { $_.IPAddress -notlike '169.254.*' } |
Select-Object -First 1
).IPAddress
echo "HOST_IP_ADDRESS=$env:hostip" >> $env:GITHUB_ENV
ipconfig
# add the CRL Distribution Point to hosts so that it's discoverable when running the AMWA test suite in mDNS mode
Expand Down
Loading