forked from usgs/pestpp
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (67 loc) · 1.92 KB
/
release.yml
File metadata and controls
73 lines (67 loc) · 1.92 KB
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
name: Release Pest++
on:
workflow_call:
inputs:
branch:
description: 'Branch to release from.'
required: true
type: string
version:
description: 'Release version number.'
required: true
type: string
env:
PIXI_BETA_WARNING_OFF: true
jobs:
build:
name: Build ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-13, macos-14, windows-2022]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout pest++
uses: actions/checkout@v5
with:
repository: usgs/pestpp
ref: ${{ inputs.branch }}
- name: Setup pixi
uses: prefix-dev/setup-pixi@v0.9.0
with:
pixi-version: v0.41.4
- name: Setup windows compiler
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Set ostag
id: ostag
run: |
if [[ $RUNNER_OS == "Linux" ]]; then
ostag="linux"
elif [[ $RUNNER_OS == "macOS" ]]; then
if [[ ${{ matrix.os }} == "macos-13" ]]; then
ostag="macintel"
elif [[ ${{ matrix.os }} == "macos-14" ]]; then
ostag="mac"
fi
elif [[ $RUNNER_OS == "Windows" ]]; then
ostag="win"
fi
echo "ostag=$ostag" >> $GITHUB_OUTPUT
- name: Build binaries
run: |
pixi run configure
pixi run build-release
- name: Make distribution
run: |
path=pestpp-${{ inputs.version }}-${{ steps.ostag.outputs.ostag }}
cp -r bin $path
rm -r $path/*/ || true
- name: Upload distribution
uses: actions/upload-artifact@v4
with:
name: pestpp-${{ inputs.version }}-${{ steps.ostag.outputs.ostag }}
path: pestpp-${{ inputs.version }}-${{ steps.ostag.outputs.ostag }}