-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from tayloraswift/validate-docs
validate docs
- Loading branch information
Showing
9 changed files
with
158 additions
and
135 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This workflow validates the package’s documentation. Because documentation building involves | ||
# compiling the package, this also checks that the package itself compiles successfully on each | ||
# supported platform. | ||
name: documentation | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-24.04 | ||
name: Ubuntu 24.04 | ||
|
||
steps: | ||
- name: Install Swift | ||
uses: tayloraswift/swift-install-action@master | ||
with: | ||
swift-prefix: "swift-5.10.1-release/ubuntu2404/swift-5.10.1-RELEASE" | ||
swift-id: "swift-5.10.1-RELEASE-ubuntu24.04" | ||
|
||
- name: Install Unidoc | ||
uses: tayloraswift/swift-unidoc-action@master | ||
with: | ||
unidoc-version: "master" | ||
|
||
# This clobbers everything in the current directory! | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Validate documentation | ||
run: | | ||
unidoc compile -I .. \ | ||
--swift-toolchain $SWIFT_INSTALLATION \ | ||
--ci fail-on-errors \ | ||
--package-name swift-png | ||
macos: | ||
runs-on: macos-14 | ||
name: macOS | ||
env: | ||
DEVELOPER_DIR: "/Applications/Xcode_15.3.app/Contents/Developer" | ||
|
||
steps: | ||
- name: Install Unidoc | ||
uses: tayloraswift/swift-unidoc-action@master | ||
with: | ||
unidoc-version: "master" | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Validate documentation | ||
run: | | ||
unidoc compile -I .. \ | ||
--ci fail-on-errors \ | ||
--package-name swift-png |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-24.04 | ||
name: Ubuntu 24.04 | ||
|
||
steps: | ||
- name: Install Swift | ||
uses: tayloraswift/swift-install-action@master | ||
with: | ||
swift-prefix: "swift-5.10.1-release/ubuntu2404/swift-5.10.1-RELEASE" | ||
swift-id: "swift-5.10.1-RELEASE-ubuntu24.04" | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- run: .github/pipeline | ||
|
||
macos: | ||
runs-on: macos-14 | ||
name: macOS | ||
strategy: | ||
matrix: | ||
swift: | ||
- toolchain: 5.10.1-RELEASE | ||
branch: swift-5.10.1-release | ||
|
||
env: | ||
SWIFT_TOOLCHAIN_DIRECTORY: >- | ||
/Library/Developer/Toolchains/swift-${{ matrix.swift.toolchain }}.xctoolchain | ||
steps: | ||
- name: Cache Swift toolchain | ||
id: cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/swift-${{ matrix.swift.toolchain }}.pkg | ||
key: macos:swift:${{ matrix.swift.toolchain }} | ||
|
||
- name: Download toolchain | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: "curl https://download.swift.org/\ | ||
${{ matrix.swift.branch }}/xcode/\ | ||
swift-${{ matrix.swift.toolchain }}/\ | ||
swift-${{ matrix.swift.toolchain }}-osx.pkg \ | ||
--output ~/swift-${{ matrix.swift.toolchain }}.pkg" | ||
|
||
- name: Install toolchain | ||
run: | | ||
sudo installer -pkg ~/swift-${{ matrix.swift.toolchain }}.pkg -target / | ||
- name: Select toolchain | ||
run: | | ||
echo "TOOLCHAINS=$(plutil -extract CFBundleIdentifier raw \ | ||
$SWIFT_TOOLCHAIN_DIRECTORY/Info.plist)" >> $GITHUB_ENV | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run pipeline | ||
run: .github/pipeline | ||
|
||
devices: | ||
runs-on: macos-14 | ||
name: macOS | ||
strategy: | ||
matrix: | ||
device: [ios, tvos, watchos] | ||
env: | ||
DEVELOPER_DIR: "/Applications/Xcode_15.3.app/Contents/Developer" | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build | ||
run: | | ||
swift --version | ||
xcrun xcodebuild -list | ||
xcrun xcodebuild build \ | ||
-scheme "PNG" \ | ||
-destination "generic/platform=${{ matrix.device }}" |
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
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
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
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
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