forked from tarantool/tarantool
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (87 loc) · 3.25 KB
/
osx.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
name: osx
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
osx:
# Run for tarantool/tarantool repository only.
if: github.repository == 'tarantool/tarantool'
runs-on:
- 'macos-${{ matrix.osx-version }}-self-hosted'
- '${{ matrix.machine-arch }}'
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
osx-version: [ 13, 14 ]
machine-arch: [ x86_64, aarch64 ]
tarantool-branch:
- 'master'
- 'release/3.0'
- 'release/2.11'
- 'release/2.10'
build-type: [ debug, release ]
steps:
- name: Prepare checkout
uses: tarantool/actions/prepare-checkout@master
- name: Sources checkout
uses: actions/checkout@v4
with:
ref: ${{ matrix.tarantool-branch }}
fetch-depth: 0
submodules: recursive
- uses: ./.github/actions/environment
- name: Install deps
uses: ./.github/actions/install-deps-osx
- name: Run testing
run: make -f .test.mk test-osx-${{ matrix.build-type }}
- name: Send VK Teams message on failure
if: failure()
uses: ./.github/actions/report-job-status
with:
bot-token: ${{ secrets.VKTEAMS_BOT_TOKEN }}
- name: Calculate short name for Tarantool branch
if: failure()
run: >
echo "SHORT_BRANCH_NAME=$(basename ${{ matrix.tarantool-branch }})" >>
$GITHUB_ENV
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ format(
'osx-{0}-{1}-{2}-{3}',
matrix.osx-version,
matrix.machine-arch,
env.SHORT_BRANCH_NAME,
matrix.build-type) }}
retention-days: 21
path: ${{ env.VARDIR }}/artifacts
- name: Upload artifacts to S3
uses: ./.github/actions/s3-upload-artifact
if: ( success() || failure() ) && ( github.ref == 'refs/heads/master' ||
startsWith(github.ref, 'refs/heads/release/') ||
startsWith(github.ref, 'refs/tags/') )
with:
job-name: ${{ github.job }} (${{ join(matrix.*, ', ') }})
access-key-id: ${{ secrets.MULTIVAC_S3_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.MULTIVAC_S3_SECRET_ACCESS_KEY }}
source: ${{ env.VARDIR }}/artifacts
# From time to time, this step fails due to the following error:
#
# Error: Unable to retrieve job ID by provided job name
#
# The action tries to get job ID by the name via the `get-job-id` action
# to compose the proper artifact name. `get-job-id` performs a request
# to GitHub for the list of workflow jobs and finds the job by its name
# and then gets its ID.
#
# For some reason, sometimes GitHub doesn't give the complete job list
# and there is no chance to find the job and get its ID. At least, it
# has been noticed for this workflow with 32 parallel jobs.
#
# It looks like the issue resides on the GitHub side and the simplest
# way to resolve this is to ignore the failure and not fail the whole
# workflow due to this GitHub bug.
continue-on-error: true