-
Notifications
You must be signed in to change notification settings - Fork 6
90 lines (90 loc) · 3.01 KB
/
build.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
name: build
on: [push, pull_request]
env:
OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
jobs:
create-staging-repo:
env:
STAGING: true
name: Create staging repository
runs-on: ubuntu-latest
outputs:
staging-repo: ${{ steps.create-repo.outputs.repo }}
steps:
- uses: actions/checkout@v2
- id: create-repo
if: startsWith(github.ref, 'refs/tags/v') == true
run: "mvn -B --settings mvnsettings.xml nexus-staging:rc-open -DserverId=ossrh -DnexusUrl=https://oss.sonatype.org/ -DstagingProfileId=72c1cc10566951 -DopenedRepositoryMessageFormat='\nrepo=%s' | grep 'repo=' >> $GITHUB_OUTPUT"
build-native:
name: Build native libs
needs: create-staging-repo
runs-on: ${{ matrix.runner }}
defaults:
run:
shell: ${{ matrix.shell }}
strategy:
fail-fast: false
matrix:
include:
- os: windows
runner: windows-2019
shell: msys2 {0}
platform: windows-x86_64
jdkArch: x64
#- os: macos
# runner: macos-13
# shell: bash
# platform: macosx-x86_64
# jdkArch: x64
#- os: macos
# runner: macos-13-xlarge
# shell: bash
# platform: macosx-arm64
# jdkArch: aarch64
#- os: linux
# runner: ubuntu-latest
# shell: bash
# platform: linux-x86_64
#- os: linux
# runner: buildjet-4vcpu-ubuntu-2204-arm
# shell: bash
# platform: linux-arm64
env:
STAGING_REPO: ${{ needs.create-staging-repo.outputs.staging-repo }}
DETECTED_PLATFORM: ${{ matrix.platform }}
STAGING: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: >-
make
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-cmake
- uses: actions/setup-java@v3
if: matrix.os == 'macos' || matrix.os == 'windows'
with:
distribution: 'temurin'
java-version: '21'
architecture: ${{ matrix.jdkArch }}
- uses: maxim-lobanov/setup-xcode@v1
if: matrix.os == 'macos'
with:
xcode-version: 14.1
- name: Set signing keys
if: startsWith(github.ref, 'refs/tags/v') == true
run: |
echo "SIGN_KEY<<EOF" >> $GITHUB_ENV
echo "${{ secrets.SIGN_KEY }}" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "SIGN_KEY_PASS=${{ secrets.SIGN_KEY_PASS }}" >> $GITHUB_ENV
- name: Build native binaries
run: ./build.sh deploy
if: matrix.os == 'macos' || matrix.os == 'windows'
- name: Build native binaries in centos container
if: matrix.os == 'linux'
uses: docker://ghcr.io/gliwka/centos7-toolchain:main@sha256:e6cf17223408bb4d1314be547d74b23d04bcf6480d2fe23822fb672a52775f76
with:
args: '"./build.sh deploy"'