-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (97 loc) · 2.68 KB
/
release.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
104
105
106
107
108
109
110
111
112
113
114
name: Release
on:
push:
branches: ["main"]
tags: ["v*"]
jobs:
macos_build:
name: MacOS (${{ matrix.OS }})
strategy:
fail-fast: true
matrix:
OS: ["macos-12", "macos-14"]
runs-on: ${{ matrix.OS }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
cache: 'sbt'
- name: Install SBT
run: brew install sbt
- name: Build the binary
run: sbt buildPlatformBinary
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: out/release/*
name: ${{ matrix.os }}-binaries
if-no-files-found: error
linux_build:
name: Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
cache: 'sbt'
- name: Build the binary
run: sbt buildPlatformBinary
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: out/release/*
name: ${{ matrix.os }}-binaries
if-no-files-found: error
windows_build:
name: Windows
strategy:
fail-fast: false
runs-on: windows-2019
env:
LLVM_BIN: 'C:\Program Files\LLVM\bin'
LLVM_VERSION: "17.0.6"
steps:
# This step is important to make sure scalafmt
# checks don't fail
- name: Setup git config
run: git config --global core.autocrlf false
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
cache: 'sbt'
# See https://github.com/scala-native/scala-native/blob/master/.github/actions/windows-setup-env/action.yml#L14 SN_RELE
# for details
- name: Configure Pagefile
uses: al-cheb/[email protected]
with:
minimum-size: 4GB
maximum-size: 16GB
- run: clang -v
shell: cmd
- name: Install clang and SBT
shell: pwsh
run: |
choco install llvm --version="$Env:LLVM_VERSION" --allow-downgrade
choco install sbt --version=1.10.0
clang --version
- name: Build binary (windows)
run: sbt buildPlatformBinary
shell: cmd
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
path: out/release/*
name: windows-binaries
if-no-files-found: error