-
-
Notifications
You must be signed in to change notification settings - Fork 52
144 lines (131 loc) · 4.86 KB
/
nightly.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Deploy Nightly
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
nightly:
name: Deploy nightly
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:
# use for 32 bit build
- os: windows-latest
arch: x86
- os: macos-latest
arch: arm64-apple-macos
arch_short: arm64
build: release
cross: "1"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- 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
if [ -z "${{matrix.build}}" ]; then
echo "build=release-debug" >> $GITHUB_OUTPUT
else
echo "build=${{matrix.build}}" >> $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 }}
ARCH_SHORT: ${{ steps.vars.outputs.arch_short }}
BUILD: ${{ steps.vars.outputs.build }}
- name: Deploy Linux release
if: matrix.os == 'ubuntu-20.04'
uses: WebFreak001/deploy-nightly@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/Pure-D/serve-d/releases/20717582/assets{?name,label}
release_id: 20717582
asset_path: ./serve-d.tar.xz
asset_name: serve-d_linux-nightly-${{ steps.vars.outputs.arch_short }}-$$.tar.xz
asset_content_type: application/x-gtar
- name: Deploy Linux release (tar.gz)
if: matrix.os == 'ubuntu-20.04'
uses: WebFreak001/deploy-nightly@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/Pure-D/serve-d/releases/20717582/assets{?name,label}
release_id: 20717582
asset_path: ./serve-d.tar.gz
asset_name: serve-d_linux-nightly-${{ steps.vars.outputs.arch_short }}-$$.tar.gz
asset_content_type: application/gzip
# OSX release
- name: Build OSX release
run: ./ci/build.sh
if: matrix.os == 'macos-latest'
env:
MACOSX_DEPLOYMENT_TARGET: '10.12'
ARCH: ${{ matrix.arch }}
ARCH_SHORT: ${{ steps.vars.outputs.arch_short }}
BUILD: ${{ steps.vars.outputs.build }}
CROSS: ${{ matrix.cross }}
- name: Deploy OSX release
if: matrix.os == 'macos-latest'
uses: WebFreak001/deploy-nightly@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/Pure-D/serve-d/releases/20717582/assets{?name,label}
release_id: 20717582
asset_path: ./serve-d.tar.xz
asset_name: serve-d_osx-nightly-${{ steps.vars.outputs.arch_short }}-$$.tar.xz
asset_content_type: application/x-gtar
- name: Deploy OSX release (tar.gz)
if: matrix.os == 'macos-latest'
uses: WebFreak001/deploy-nightly@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/Pure-D/serve-d/releases/20717582/assets{?name,label}
release_id: 20717582
asset_path: ./serve-d.tar.gz
asset_name: serve-d_osx-nightly-${{ steps.vars.outputs.arch_short }}-$$.tar.gz
asset_content_type: application/gzip
# Windows release
- name: Build Windows release
run: .\ci\build.bat
if: matrix.os == 'windows-latest'
env:
BUILD: ${{ steps.vars.outputs.build }}
ARCH: ${{ matrix.arch }}
ARCH_SHORT: ${{ steps.vars.outputs.arch_short }}
CROSS: ${{ matrix.cross }}
- name: Deploy Windows release
if: matrix.os == 'windows-latest'
uses: WebFreak001/deploy-nightly@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: https://uploads.github.com/repos/Pure-D/serve-d/releases/20717582/assets{?name,label}
release_id: 20717582
asset_path: ./serve-d.zip
asset_name: serve-d_windows-nightly-${{ steps.vars.outputs.arch_short }}-$$.zip
asset_content_type: application/zip
- name: cache dependency binaries
uses: WebFreak001/[email protected]
with:
store: true