-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (88 loc) · 2.54 KB
/
build.yaml
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
name: build
on:
pull_request: {}
workflow_dispatch: {}
push:
branches:
- 'main'
tags-ignore:
- '**'
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
jobs:
build_deps:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
arch: [ amd64 ]
cmake-arch: [ x86_64 ]
openssl-arch: [ linux-x86_64 ]
include:
- os: macOS-latest
arch: x86_64
cmake-arch: x86_64
openssl-arch: darwin64-x86_64-cc
- os: macOS-latest
arch: aarch64
cmake-arch: arm64
openssl-arch: darwin64-arm64-cc
# TODO: build on 'windows-latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
if: matrix.os == 'macOS-latest'
run: brew install coreutils
- name: Build native library
run: ./.github/workflows/build-deps.sh -a ${{ matrix.arch }} -c ${{ matrix.cmake-arch }} -o ${{ matrix.openssl-arch }}
- name: Upload native libraries
uses: actions/upload-artifact@v3
with:
name: native-libraries
path: ./native/*
if-no-files-found: error
- name: Upload libgit2 includes
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
name: libgit-include
path: ./libgit2/include
if-no-files-found: error
build:
needs: build_deps
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macOS-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 21
- name: Download native libraries
uses: actions/download-artifact@master
with:
name: native-libraries
path: native
- name: Download libgit2 includes
uses: actions/download-artifact@master
with:
name: libgit-include
path: libgit2/include
- run: ./gradlew build
- uses: actions/upload-artifact@v3
if: failure()
with:
name: test-report
path: build/reports/tests/test/
if-no-files-found: ignore
- name: Upload distribution
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v3
with:
name: st
path: ./build/distributions/st.tar
if-no-files-found: error