-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (99 loc) · 3.1 KB
/
releases.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
name: Upload prebuild binaries
on:
release:
types: [published]
jobs:
nightly:
name: Deploy releases
strategy:
fail-fast: false
matrix:
# ubuntu / linux must run on kinda old linux for glibc compatibility!
os: [ubuntu-20.04, windows-latest, macos-latest]
arch: [x86_64]
include:
- os: macos-latest
arch: arm64-apple-macos
arch_short: arm64
cross: "1"
# ARM linux needs to download runtime from ldc, which isn't yet supported with setup-dlang
# - os: ubuntu-20.04
# arch: aarch64-linux-gnu
# arch_short: aarch64
# cross: "1"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- id: vars
shell: bash
run: |
if [ -z "${{matrix.arch_short}}" ]; then
echo "arch_short=${{matrix.arch}}" >> $GITHUB_OUTPUT
else
echo "arch_short=${{matrix.arch_short}}" >> $GITHUB_OUTPUT
fi
- name: Install D compiler
uses: dlang-community/setup-dlang@v1
with:
compiler: ldc-latest
- name: Run tests
run: dub test
# Linux release
- name: Build Linux release
run: ./ci/build.sh
if: matrix.os == 'ubuntu-20.04'
env:
ARCH: ${{ matrix.arch }}
BUILD: release
CROSS: ${{ matrix.cross }}
- name: Deploy Linux release
if: matrix.os == 'ubuntu-20.04'
uses: WebFreak001/upload-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OS: linux-${{ steps.vars.outputs.arch_short }}
with:
file: ./sdlfmt.tar.xz
mime: application/x-gtar
name: sdlfmt_${TAG}-${OS}.tar.xz
# OSX release
- name: Build OSX release
run: ./ci/build.sh
if: matrix.os == 'macos-latest'
env:
MACOSX_DEPLOYMENT_TARGET: '10.12'
ARCH: ${{ matrix.arch }}
BUILD: release
CROSS: ${{ matrix.cross }}
- name: Deploy OSX release
if: matrix.os == 'macos-latest'
uses: WebFreak001/upload-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OS: osx-${{ steps.vars.outputs.arch_short }}
with:
file: ./sdlfmt.tar.xz
mime: application/x-gtar
name: sdlfmt_${TAG}-${OS}.tar.xz
# Windows release
- name: Build Windows release
run: .\ci\build.bat
if: matrix.os == 'windows-latest'
env:
BUILD: release
ARCH: ${{ matrix.arch }}
CROSS: ${{ matrix.cross }}
- name: Deploy Windows release
if: matrix.os == 'windows-latest'
uses: WebFreak001/upload-asset@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OS: windows-${{ steps.vars.outputs.arch_short }}
with:
file: ./sdlfmt.zip
mime: application/zip
name: sdlfmt_${TAG}-${OS}.zip
- name: cache dependency binaries
uses: WebFreak001/[email protected]
with:
store: true