-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (73 loc) · 2 KB
/
build-libraries.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
name: Build libraries
on:
push:
create:
tags:
- '*'
jobs:
build_macosx_x86_64:
name: Build MacOSX (x86_64)
runs-on: macOS-11
env:
ARTIFACT_NAME: macosx_x86_64
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up CMake
uses: lukka/get-cmake@latest
- name: Install wget
run: brew install wget
- name: Run the build
run: |
git config --global --add safe.directory $(pwd)
./build_macosx.sh "x86_64" ${ARTIFACT_NAME}
- name: Move tarballs
run: |
mkdir artifacts
mv libaec/libaec-*.tar.gz artifacts
mv libhdf5/libhdf5-*.tar.gz artifacts
- name: Upload tarballs
uses: actions/upload-artifact@v3
with:
path: artifacts/*.tar.gz
build_windows_x86_64:
name: Build Windows (x86_64)
runs-on: windows-2019
env:
ARTIFACT_NAME: windows_x86_64
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run the build
run: |
git config --global --add safe.directory $(pwd)
./build_windows.sh ${ARTIFACT_NAME}
shell: bash
- name: Move tarballs
run: |
mkdir artifacts
mv libaec/libaec-*.tar.gz artifacts
mv libhdf5/libhdf5-*.tar.gz artifacts
shell: bash
- name: Upload tarballs
uses: actions/upload-artifact@v3
with:
path: artifacts/*.tar.gz
publish:
name: Publish libraries
needs: [build_macosx_x86_64, build_windows_x86_64]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Download macosx (x86_64) artifact
uses: actions/download-artifact@v3
with:
path: dump
- name: List artifacts
run: ls -R
working-directory: dump
- name: Publish release
uses: softprops/action-gh-release@v1
with:
name: "HDF5 binaries (1.12.2)"
files: dump/*/*