-
Notifications
You must be signed in to change notification settings - Fork 191
108 lines (86 loc) · 3.06 KB
/
release-dmg.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
102
103
104
105
106
107
108
name: Release MacOS
on: push
# workflow_run:
# workflows: ['Release']
# types:
# - completed
jobs:
macos:
name: DMG release
runs-on: macos-latest
env:
CC: gcc
CXX: g++
FC: gfortran
F77: gfortran
ARCH: Intel
steps:
- uses: actions/checkout@main
- name: Install
run: brew install gcc coreutils m4 git flex bison
- name: Symlink GCC & Fortran
run: ./etc/actions/macos/link_fortran.sh
- name: Version
id: version
run: |
VERSION=$(grep AC_INIT configure.ac | cut -d"," -f2 | cut -d"[" -f2 | cut -d"]" -f1)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "prefix=/Applications/FreeFem++.app/Contents/ff-$VERSION" >> $GITHUB_OUTPUT
echo "dmg_dir=FreeFEM-$VERSION-$ARCH" >> $GITHUB_OUTPUT
- name: Test global script
id: dmg
run: |
mkdir $HOME/tmp
sudo ./bin/compile-version-MacOS develop $HOME/tmp generic-optim
echo $DMG_NAME
echo "file=$DMG_NAME" >>$GITHUB_OUTPUT
# - name: Create paths
# run: |
# PREFIX=${{ steps.version.outputs.prefix }}
# sudo mkdir -p "$PREFIX"
# - name: Fortran copy
# run: |
# PREFIX=${{ steps.version.outputs.prefix }}
# sudo ./etc/actions/release/macos/copy_fortran.sh "$PREFIX"
# - name: Configure
# run: |
# PREFIX=${{ steps.version.outputs.prefix }}
# autoreconf -i
# ./configure --enable-optim --enable-generic --enable-download --enable-m64 \
# --prefix="$PREFIX" \
# "CXXFLAGS=-Wno-undefined-var-template" \
# "FLIBS=-L"$PREFIX/gnu" -lgfortran -lquadmath"
# ./3rdparty/getall -a -o PETSc
# - name: PETSc
# run: |
# cd 3rdparty/ff-petsc
# make petsc-slepc SUDO=sudo
# cd -
# ./reconfigure
# - name: Build
# run: make -j2
# - name: Check
# continue-on-error: true
# run: make check
# - name: Install
# run: |
# PREFIX=${{ steps.version.outputs.prefix }}
# mkdir -p "$HOME/pkg/$PREFIX"
# rsync -a "$PREFIX/." "$HOME/pkg/$PREFIX/."
# sudo make install DESTDIR="$HOME/pkg"
# - name: Fix gfotran lib
# run: |
# PREFIX=${{ steps.version.outputs.prefix }}
# sudo ./etc/actions/release/macos/fix_fortran.sh "$HOME/pkg" "$PREFIX"
# - name: Create DMG
# id: dmg
# run: |
# DMG_DIR=${{ steps.version.outputs.dmg_dir }}
# sudo ./etc/actions/release/macos/create_dmg.sh "$HOME/pkg" "$DMG_DIR"
# echo "file=$DMG_DIR.dmg" >>$GITHUB_OUTPUT
- name: Upload release
uses: AButler/[email protected]
with:
files: ${{ steps.dmg.outputs.file }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: v${{ steps.version.outputs.version }}-testActions