-
-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (71 loc) · 3.09 KB
/
package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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"