-
Notifications
You must be signed in to change notification settings - Fork 2
112 lines (104 loc) · 3.55 KB
/
Copy pathci.yml
File metadata and controls
112 lines (104 loc) · 3.55 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: CI
on:
pull_request:
push:
branches:
- main
- master
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
filter:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.2.0
with:
paths: '[".github/workflows/ci.yml", "Sources/**", "Tests/**", "Package.*", "Externals"]'
do_not_skip: '["push", "workflow_dispatch", "schedule"]'
run-danger:
name: Run Danger
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Install danger-js
run: brew install danger/tap/danger-js
- run: swift test
- run: swift run danger-swift ci --verbose --failOnErrors
if: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# build-windows-executable:
# name: Build Windows Executable
# runs-on: windows-latest
# steps:
# - uses: compnerd/gha-setup-swift@main
# with:
# branch: swift-5.6-release
# tag: 5.6-RELEASE
# - uses: actions/checkout@v2
# - run: git config --global core.protectNTFS false
# - run: swift build -c release --static-swift-stdlib --product docgen
# - run: cmd /r dir /s /b /o:gn
# - run: cp .build\release\docgen.exe docgen.exe
# - uses: actions/upload-artifact@v3
# with:
# name: docgen-windows.exe
# path: docgen.exe
# build-executables:
# name: Build Ubuntu
# runs-on: macos-12
# steps:
# - uses: actions/checkout@v2
# - name: Install cross-compiler tool
# run: brew install keith/formulae/swiftpm-linux-cross
# - name: Setup toolchain
# run: setup-swiftpm-toolchain --ubuntu-release focal --arch x86_64 --swift-version 5.6.2
# - uses: swift-actions/setup-swift@v1
# with:
# swift-version: "5.6.2"
# - name: Cross compile
# run: TOOLCHAINS=$(/usr/libexec/PlistBuddy -c "print :CFBundleIdentifier" /Users/runner/hostedtoolcache/swift-macOS/5.6.2/x64/Info.plist) swift build -c release --product docgen --static-swift-stdlib --destination toolchain-focal-x86_64-5.6.2/destination_static.json
swiftpm_linux:
name: SwiftPM, Linux
needs: filter
runs-on: ubuntu-latest
strategy:
matrix:
container:
- swift:5.7
fail-fast: false
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v3
if: ${{ needs.filter.outputs.should_skip != 'true' }}
- run: swift build -Xswiftc -suppress-warnings -c release --static-swift-stdlib --product docgen
if: ${{ needs.filter.outputs.should_skip != 'true' }}
- run: cp .build/release/docgen docgen
- uses: actions/upload-artifact@v3
with:
name: docgen-linux
path: docgen
swiftpm_darwin:
name: SwiftPM, Darwin, Xcode ${{ matrix.xcode }}
needs: filter
runs-on: macos-12
strategy:
matrix:
xcode: ["14.0.1"]
fail-fast: false
env:
DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app"
steps:
- uses: actions/checkout@v3
if: ${{ needs.filter.outputs.should_skip != 'true' }}
- run: swift build -Xswiftc -suppress-warnings -c release --static-swift-stdlib --product docgen
if: ${{ needs.filter.outputs.should_skip != 'true' }}
- run: cp .build/release/docgen docgen
- uses: actions/upload-artifact@v3
with:
name: docgen-macos
path: docgen