-
Notifications
You must be signed in to change notification settings - Fork 55
155 lines (143 loc) · 4.48 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
145
146
147
148
149
150
151
152
name: Nightly Clio build and testing
on:
schedule:
- cron: '0 5 * * 1-5'
workflow_dispatch:
pull_request:
branches: [develop]
jobs:
# build:
# name: Build clio
# strategy:
# fail-fast: false
# matrix:
# include:
# - os: macOS
# build_type: Release
# - os: Linux
# build_type: Release
# container:
# image: conanio/gcc11:1.61.0
# options: --user root
# - os: Linux
# build_type: Debug
# container:
# image: conanio/gcc11:1.61.0
# options: --user root
# runs-on: [self-hosted, "${{ matrix.os }}"]
# container: ${{ matrix.container }}
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Prepare runner
# uses: ./.github/actions/prepare_runner
# with:
# disable_ccache: true
#
# - name: Setup conan
# uses: ./.github/actions/setup_conan
# id: conan
#
# - name: Run conan and cmake
# uses: ./.github/actions/generate
# with:
# conan_profile: ${{ steps.conan.outputs.conan_profile }}
# conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
# build_type: ${{ matrix.build_type }}
#
# - name: Build Clio
# uses: ./.github/actions/build_clio
#
# - name: Strip tests
# run: strip build/clio_tests
#
# - name: Upload clio_tests
# uses: actions/upload-artifact@v3
# with:
# name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}
# path: build/clio_tests
#
# - name: Compress clio_server
# shell: bash
# run: |
# cd build
# tar czf ./clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz ./clio_server
#
# - name: Upload clio_server
# uses: actions/upload-artifact@v3
# with:
# name: clio_server_${{ runner.os }}_${{ matrix.build_type }}
# path: build/clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz
#
run_tests:
# needs: build
strategy:
fail-fast: false
matrix:
include:
- os: macOS
build_type: Release
- os: Linux
build_type: Release
- os: Linux
build_type: Debug
runs-on: [self-hosted, "${{ matrix.os }}"]
steps:
# - uses: actions/download-artifact@v3
# with:
# name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}
#
# - name: Run clio_tests
# run: |
# chmod +x ./clio_tests
# ./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*"
- name: Make mock artifacts
shell: bash
run: |
mkdir build
echo 'test' > build/clio_tests
echo 'test' > build/clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz
- name: Upload clio_tests
uses: actions/upload-artifact@v3
with:
name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}
path: build/clio_tests
- name: Upload clio_server
uses: actions/upload-artifact@v3
with:
name: clio_server_${{ runner.os }}_${{ matrix.build_type }}
path: build/clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz
nightly_release:
needs: run_tests
runs-on: ubuntu-20.04
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
path: nightly_release
- name: Prepare files
shell: bash
run: |
cd nightly_release
rm -r clio_tests*
CLIO_SHA256_SUMS=''
for d in $(ls); do
archive_name=$(ls $d)
mv ${d}/${archive_name} ./
rm -r $d
sha256sum ./$archive_name > ./${archive_name}.sha256sum
echo -e "$(cat ./${archive_name}.sha256sum)\n${CLIO_SHA256_SUMS}"
done
echo $CLIO_SHA256_SUMS >> $GITHUB_ENV
- name: Publish nightly release
shell: bash
run: |
gh release create nightly --prerelease --title "Clio development (nightly) build" --target $GITHUB_SHA --notes-file "${{ github.workspace }}/.github/workflows/nightly_notes.md" ./clio_server*