Skip to content

Commit

Permalink
Use workflows in SwiftWorkflows
Browse files Browse the repository at this point in the history
  • Loading branch information
LebJe committed Dec 11, 2023
1 parent 62d8240 commit 0f141cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 76 deletions.
48 changes: 2 additions & 46 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,5 @@ name: "Build and Test"
on: ["push", "pull_request"]

jobs:
TestOnMacOS-Latest-x86_64:
runs-on: "macos-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Run tests"
run: "swift test"
# TestOnUbuntu-20_04-ARM:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: uraimo/[email protected]
# with:
# arch: aarch64
# distro: ubuntu20.04
# githubToken: ${{ secrets.GITHUB_TOKEN }}
# run: |
# export DEBIAN_FRONTEND=noninteractive
# apt update -q
# apt install -yq curl sudo
# curl -s https://packagecloud.io/install/repositories/swift-arm/release/script.deb.sh | sudo bash
# apt install -yq swiftlang
# apt update -yq
# swift test
TestOnUbuntu-20_04-x86_64:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Run tests"
run: "swift test"
TestOnWindows10-x86_64:
runs-on: "windows-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "seanmiddleditch/gha-setup-vsdevenv@master"
- uses: "compnerd/gha-setup-swift@main"
with:
branch: "swift-5.8-release"
tag: "5.8-RELEASE"
- name: "Test"
run: "swift test -Xcc -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH -Xcxx -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH"
TestBuildingOnMacOS-Latest-ARM64:
runs-on: "macos-latest"
steps:
- uses: "actions/checkout@v4"
- name: "Run tests"
run: "swift build --arch arm64"
"BuildAndTest":
uses: LebJe/SwiftWorkflows/.github/workflows/buildAndTest.yml@main
34 changes: 4 additions & 30 deletions .github/workflows/generateDocumentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,7 @@ on:

jobs:
"GenerateDocumentation":
runs-on: "macos-latest"
steps:
- uses: "actions/checkout@v4"
# - name: "Clone swift-docc-render"
# run: "gh repo clone LebJe/swift-docc-render"
# env:
# GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# - name: "Build swift-docc-render"
# run: "cd swift-docc-render/ && npm install && npm run build && cd .."
- name: "Build TOMLKit"
run: "swift build --target TOMLKit -Xswiftc -emit-symbol-graph -Xswiftc -emit-symbol-graph-dir -Xswiftc .build"
- name: "Build documentation"
run: |
#export DOCC_HTML_DIR=swift-docc-render/dist
xcrun docc convert \
Sources/TOMLKit/TOMLKit.docc \
--fallback-display-name TOMLKit \
--fallback-bundle-identifier com.LebJe.TOMKit \
--fallback-bundle-version 1 \
--additional-symbol-graph-dir .build \
--enable-inherited-docs \
--output-dir docs
xcrun docc process-archive transform-for-static-hosting docs --hosting-base-path /TOMLKit
- name: "Deploy to GitHub Pages"
uses: "peaceiris/actions-gh-pages@v3"
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
publish_dir: "docs"
uses: LebJe/SwiftWorkflows/.github/workflows/generateDocumentation.yml@main
with:
TargetName: "TOMLKit"
DoccBundlePath: "Sources/TOMLKit/TOMLKit.docc"

0 comments on commit 0f141cb

Please sign in to comment.