diff --git a/.github/workflows/buildAndTest.yml b/.github/workflows/buildAndTest.yml index 2e265d4a..ff0243a0 100644 --- a/.github/workflows/buildAndTest.yml +++ b/.github/workflows/buildAndTest.yml @@ -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/run-on-arch-action@v2.0.7 - # 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 diff --git a/.github/workflows/generateDocumentation.yml b/.github/workflows/generateDocumentation.yml index 762f26cf..41745c8a 100644 --- a/.github/workflows/generateDocumentation.yml +++ b/.github/workflows/generateDocumentation.yml @@ -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"