This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
Bump minimist from 1.2.5 to 1.2.8 in /.node #612
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: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
macos_big_sur: | |
runs-on: macos-11.0 | |
strategy: | |
matrix: | |
xcode: | |
- "12.4" # Swift 5.3 | |
name: "macOS Big Sur (Xcode ${{ matrix.xcode }})" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- uses: actions/cache@v2 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm-xcode-${{ matrix.xcode }}- | |
- name: Install System Dependencies | |
run: | | |
brew bundle | |
- name: Build and Test | |
run: | | |
swift test -c release | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
macos_catalina: | |
runs-on: macos-10.15 | |
strategy: | |
matrix: | |
xcode: | |
- "12.4" # Swift 5.3 | |
name: "macOS Catalina (Xcode ${{ matrix.xcode }})" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- uses: actions/cache@v2 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm-xcode-${{ matrix.xcode }}- | |
- name: Install System Dependencies | |
run: | | |
brew bundle | |
- name: Build and Test | |
run: | | |
swift test -c release | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
swift: ["5.3"] | |
name: "Linux (Swift ${{ matrix.swift }})" | |
container: | |
image: swift:${{ matrix.swift }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- uses: actions/cache@v2 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-swift-${{ matrix.swift }}-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm-swift-${{ matrix.swift }}- | |
- name: Install System Dependencies | |
run: | | |
apt-get update | |
apt-get install -y libxml2-dev graphviz-dev | |
- name: Build and Test | |
run: swift test -c release --enable-test-discovery | |
windows: | |
runs-on: windows-latest | |
name: "Windows (Swift ${{ matrix.tag }})" | |
strategy: | |
matrix: | |
include: | |
- tag: 5.5-DEVELOPMENT-SNAPSHOT-2021-05-09-a | |
branch: swift-5.5-branch | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: seanmiddleditch/gha-setup-vsdevenv@master | |
- name: Install Swift ${{ matrix.tag }} | |
run: | | |
Install-Binary -Url "https://swift.org/builds/${{ matrix.branch }}/windows10/swift-${{ matrix.tag }}/swift-${{ matrix.tag }}-windows10.exe" -Name "installer.exe" -ArgumentList ("-q") | |
- name: Set Environment Variables | |
run: | | |
echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Adjust Paths | |
run: | | |
echo "C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Install Supporting Files | |
run: | | |
Copy-Item "$env:SDKROOT\usr\share\ucrt.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\ucrt\module.modulemap" | |
Copy-Item "$env:SDKROOT\usr\share\visualc.modulemap" -destination "$env:VCToolsInstallDir\include\module.modulemap" | |
Copy-Item "$env:SDKROOT\usr\share\visualc.apinotes" -destination "$env:VCToolsInstallDir\include\visualc.apinotes" | |
Copy-Item "$env:SDKROOT\usr\share\winsdk.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\um\module.modulemap" | |
# TODO(compnerd) figure out how to build libxml2 | |
- name: Fetch libxml2 | |
run: | | |
Invoke-WebRequest -Uri "https://artprodeus21.artifacts.visualstudio.com/A8fd008a0-56bc-482c-ba46-67f9425510be/3133d6ab-80a8-4996-ac4f-03df25cd3224/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2NvbXBuZXJkL3Byb2plY3RJZC8zMTMzZDZhYi04MGE4LTQ5OTYtYWM0Zi0wM2RmMjVjZDMyMjQvYnVpbGRJZC8zNTI5NS9hcnRpZmFjdE5hbWUveG1sMi13aW5kb3dzLXg2NA2/content?format=zip" -OutFile $env:Temp\xml-windows-x64.zip | |
Expand-Archive -Path $env:Temp\xml-windows-x64.zip -DestinationPath $env:Temp -Force | |
Move-Item -Path $env:Temp\xml2-windows-x64\Library\libxml2-development -Destination C:\Library\ -Force | |
# TODO(compnerd) figure out how to build graphviz | |
- name: Fetch graphviz | |
run: | | |
Invoke-WebRequest -Uri "https://artprodeus21.artifacts.visualstudio.com/A8fd008a0-56bc-482c-ba46-67f9425510be/3133d6ab-80a8-4996-ac4f-03df25cd3224/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2NvbXBuZXJkL3Byb2plY3RJZC8zMTMzZDZhYi04MGE4LTQ5OTYtYWM0Zi0wM2RmMjVjZDMyMjQvYnVpbGRJZC81MTAzNC9hcnRpZmFjdE5hbWUvZ3JhcGh2aXotd2luZG93cy14NjQ1/content?format=zip" -OutFile $env:Temp\graphviz-windows-x64.zip | |
Expand-Archive -Path $env:Temp\graphviz-windows-x64.zip -Destination $env:Temp -Force | |
Move-Item -Path $env:Temp\graphviz-windows-x64\Library\graphviz-development -Destination C:\Library\ -Force | |
- name: Add graphviz to PATH | |
run: | | |
echo "C:\Library\graphviz-development\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Build and Test | |
run: | | |
swift build -v -c release -Xlinker -LC:\Library\graphviz-development\usr\lib -Xcc -DLIBXML_STATIC -Xcc -IC:\Library\libxml2-development\usr\include -Xcc -IC:\Library\libxml2-development\usr\include\libxml2 -Xlinker -LC:\Library\libxml2-development\usr\lib -Xcc -IC:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\include -Xlinker -LC:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\lib | |
- name: Package | |
run: | | |
msbuild WiX/swift-doc.wixproj -nologo -p:Configuration=Release -p:OutputPath=$PWD\.build\artifacts -p:RunWixToolsOutOfProc=true -p:GRAPHVIZ_ROOT=C:\Library\graphviz-development -p:SWIFT_DOC_BUILD=$PWD\.build\release # -p:ProductVersion=$env:GITHUB_REF.Replace('refs/tags/', '') | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: swift-doc.msi | |
path: .build\artifacts\swift-doc.msi | |
validate-assets: | |
runs-on: ubuntu-latest | |
name: "Validate Assets" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('.node/**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install node dependencies | |
run: | | |
cd .node | |
npm install | |
- name: Test assets | |
run: | | |
cd .node | |
OLD=`cksum ../Sources/swift-doc/Generated/CSS.swift` | |
npm run build | |
NEW=`cksum ../Sources/swift-doc/Generated/CSS.swift` | |
if [[ "$OLD" != "$NEW" ]]; then | |
echo "Regenerated assets differ from committed version" | |
exit -1 | |
fi |