|
| 1 | +name: windows |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + branches: [ main ] |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + runs-on: windows-latest |
| 10 | + |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v2 |
| 13 | + - uses: seanmiddleditch/gha-setup-vsdevenv@master |
| 14 | + |
| 15 | + - name: Install swift-DEVELOPMENT-SNAPSHOT-2020-12-14-a |
| 16 | + run: | |
| 17 | + Install-Binary -Url "https://swift.org/builds/development/windows10/swift-DEVELOPMENT-SNAPSHOT-2020-12-14-a/swift-DEVELOPMENT-SNAPSHOT-2020-12-14-a-windows10.exe" -Name "installer.exe" -ArgumentList ("-q") |
| 18 | + - name: Set Environment Variables |
| 19 | + run: | |
| 20 | + echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
| 21 | + echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
| 22 | + - name: Adjust Paths |
| 23 | + run: | |
| 24 | + echo "C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 25 | + echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 26 | + - name: Install Supporting Files |
| 27 | + run: | |
| 28 | + Copy-Item "$env:SDKROOT\usr\share\ucrt.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\ucrt\module.modulemap" |
| 29 | + Copy-Item "$env:SDKROOT\usr\share\visualc.modulemap" -destination "$env:VCToolsInstallDir\include\module.modulemap" |
| 30 | + Copy-Item "$env:SDKROOT\usr\share\visualc.apinotes" -destination "$env:VCToolsInstallDir\include\visualc.apinotes" |
| 31 | + Copy-Item "$env:SDKROOT\usr\share\winsdk.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\um\module.modulemap" |
| 32 | +
|
| 33 | + - name: Install X10 |
| 34 | + run: | |
| 35 | + Invoke-WebRequest -UseBasicParsing -Uri https://artprodeus21.artifacts.visualstudio.com/A8fd008a0-56bc-482c-ba46-67f9425510be/3133d6ab-80a8-4996-ac4f-03df25cd3224/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2NvbXBuZXJkL3Byb2plY3RJZC8zMTMzZDZhYi04MGE4LTQ5OTYtYWM0Zi0wM2RmMjVjZDMyMjQvYnVpbGRJZC80Mzc2OC9hcnRpZmFjdE5hbWUvdGVuc29yZmxvdy13aW5kb3dzLXg2NA2/content?format=zip -OutFile tensorflow-windows-x64.zip |
| 36 | + Expand-Archive -Force -Path tensorflow-windows-x64.zip -DestinationPath C:\Library\ |
| 37 | + Move-Item C:\Library\tensorflow-windows-x64\Library\tensorflow-2.3.0 C:\Library |
| 38 | + echo "C:\Library\tensorflow-2.3.0\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| 39 | +
|
| 40 | + - name: Build |
| 41 | + run: | |
| 42 | + # We build twice as the first one currently fails for some unexplained |
| 43 | + # reason. This should only build once. |
| 44 | + swift build -v -Xswiftc -DTENSORFLOW_USE_STANDARD_TOOLCHAIN -Xcc -IC:\Library\tensorflow-2.3.0\usr\include -Xlinker -LC:\Library\tensorflow-2.3.0\usr\lib |
| 45 | + swift build -v -Xswiftc -DTENSORFLOW_USE_STANDARD_TOOLCHAIN -Xcc -IC:\Library\tensorflow-2.3.0\usr\include -Xlinker -LC:\Library\tensorflow-2.3.0\usr\lib |
| 46 | + # - name: Run tests |
| 47 | + # run: swift test -v |
0 commit comments