Skip to content

Merge pull request #365 from tayloraswift/swift-testing #96

Merge pull request #365 from tayloraswift/swift-testing

Merge pull request #365 from tayloraswift/swift-testing #96

Workflow file for this run

name: package
on:
# We build semver tags, and the master branch.
push:
branches: [ master ]
tags:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
macos:
runs-on: macos-15
name: macOS
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build products
env:
UNIDOC_ENABLE_INDEXSTORE: "1"
run: |
swift --version
swift build -c release --product unidoc-publish
swift build -c release --product unidoc
- name: Upload products
env:
AWS_S3_ACCESS_SECRET: ${{ secrets.AWS_S3_ACCESS_SECRET }}
UNIDOC_PLATFORM: "${{ runner.os }}-${{ runner.arch }}"
UNIDOC_VERSION: ${{ github.head_ref || github.ref_name }}
run: |
.build/release/unidoc-publish \
unidoc \
/unidoc/$UNIDOC_VERSION/$UNIDOC_PLATFORM/unidoc \
--secret "$AWS_S3_ACCESS_SECRET"
linux:
runs-on: ubuntu-24.04
name: Ubuntu 24.04
steps:
- name: Install Swift
uses: tayloraswift/swift-install-action@master
with:
swift-prefix: "swift-6.0.1-release/ubuntu2404/swift-6.0.1-RELEASE"
swift-id: "swift-6.0.1-RELEASE-ubuntu24.04"
# This clobbers everything in the current directory, which is why we installed
# the Swift toolchain in the home directory.
- name: Checkout repository
uses: actions/checkout@v3
# For some reason, Swift cannot build both the products in one invocation.
# We pass the same flags to both invocations to speed up the build.
- name: Build products
env:
UNIDOC_ENABLE_INDEXSTORE: "1"
run: |
swift --version
swift build -c release \
--static-swift-stdlib \
--product unidoc-publish \
-Xcxx -I$SWIFT_INSTALLATION/lib/swift \
-Xcxx -I$SWIFT_INSTALLATION/lib/swift/Block
swift build -c release \
--static-swift-stdlib \
--product unidoc \
-Xcxx -I$SWIFT_INSTALLATION/lib/swift \
-Xcxx -I$SWIFT_INSTALLATION/lib/swift/Block
- name: Upload products
env:
AWS_S3_ACCESS_SECRET: ${{ secrets.AWS_S3_ACCESS_SECRET }}
UNIDOC_PLATFORM: "${{ runner.os }}-${{ runner.arch }}"
UNIDOC_VERSION: ${{ github.head_ref || github.ref_name }}
run: |
.build/release/unidoc-publish \
unidoc \
/unidoc/$UNIDOC_VERSION/$UNIDOC_PLATFORM/unidoc \
--secret "$AWS_S3_ACCESS_SECRET"