-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (101 loc) · 4.79 KB
/
buildAndTest.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: "Build and Test"
on: ["push", "pull_request"]
jobs:
TestOnMacOS-10_15-x86_64:
runs-on: "macos-10.15"
steps:
- uses: "actions/checkout@v2"
- name: "Run tests"
run: "swift test"
# - name: "Test CreateReadWrite"
# run: |
# cd Examples/CreateReadWrite
# swift build
# ./.build/debug/create Package.swift Sources/ Sources/ExtractArchive/ Sources/ExtractArchive/main.swift
# ./.build/debug/read output.cpio
# mkdir outputCPIOExtractFolder
# cd outputCPIOExtractFolder
# ./../.build/debug/extract ../output.cpio
# ls -lahR
TestOnMacOS-11_0-x86_64:
runs-on: "macos-11.0"
steps:
- uses: "actions/checkout@v2"
- name: "Run tests"
run: "swift test"
# - name: "Test CreateReadWrite"
# run: |
# cd Examples/CreateReadWrite
# swift build
# ./.build/debug/create Package.swift Sources/ Sources/ExtractArchive/ Sources/ExtractArchive/main.swift
# ./.build/debug/read output.cpio
# mkdir outputCPIOExtractFolder
# cd outputCPIOExtractFolder
# ./../.build/debug/extract ../output.cpio
# ls -lahR
# 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@v2"
- name: "Run tests"
run: "swift test"
- name: "Test CreateReadWrite"
run: |
cd Examples/CreateReadWrite
swift build
./.build/debug/create Package.swift Sources/ Sources/ExtractArchive/ Sources/ExtractArchive/main.swift
./.build/debug/read output.cpio
mkdir outputCPIOExtractFolder
cd outputCPIOExtractFolder
./../.build/debug/extract ../output.cpio
ls -lahR
TestOnWindows10-x86_64:
runs-on: "windows-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "seanmiddleditch/gha-setup-vsdevenv@master"
- name: "Install swift-5.4-RELEASE"
run: 'Install-Binary -Url "https://swift.org/builds/swift-5.4.2-release/windows10/swift-5.4.2-RELEASE/swift-5.4.2-RELEASE-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")'
- name: "Set Environment Variables"
run: |
echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: "Adjust Paths"
run: 'echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin;C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append'
- name: "Install Supporting Files"
shell: "cmd"
run: |
copy "%SDKROOT%\usr\share\ucrt.modulemap" "%UniversalCRTSdkDir%\Include\%UCRTVersion%\ucrt\module.modulemap"
copy "%SDKROOT%\usr\share\visualc.modulemap" "%VCToolsInstallDir%\include\module.modulemap"
copy "%SDKROOT%\usr\share\visualc.apinotes" "%VCToolsInstallDir%\include\visualc.apinotes"
copy "%SDKROOT%\usr\share\winsdk.modulemap" "%UniversalCRTSdkDir%\Include\%UCRTVersion%\um\module.modulemap"
- name: "Build"
run: "swift build"
# - name: "Test CreateReadWrite"
# run: |
# cd Examples/CreateReadWrite
# ls
# swift build
TestBuildingOnMacOS-11_0-ARM64:
runs-on: "macos-11.0"
steps:
- uses: "actions/checkout@v2"
- name: "Test Building For ARM"
run: "swift build --arch arm64 && swift build --package-path Examples/CreateReadWrite --arch arm64"