test without PETSc #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release MacOS ARM64 | |
on: | |
push | |
# workflow_run: | |
# workflows: ['Release'] | |
# types: | |
# - completed | |
jobs: | |
macos: | |
name: DMG release | |
runs-on: [self-hosted, macos, ARM64] | |
env: | |
CC: clang | |
CXX: clang++ | |
FC: gfortran | |
F77: gfortran | |
ARCH: ARM64 | |
steps: | |
- uses: actions/checkout@main | |
- name: Install | |
run: brew install gcc coreutils wget m4 flex bison autoconf automake | |
- 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: Cleanup | |
run: | | |
VERSION=${{ steps.version.outputs.version }} | |
sudo rm -rf "/Applications/FreeFem++.app/Contents/ff-$VERSION" | |
- name: Prepare | |
run: | | |
PREFIX=${{ steps.version.outputs.prefix }} | |
sudo mkdir -p "$PREFIX/gnu" | |
sudo ./etc/actions/release/macos/copy_fortran.sh "$PREFIX" | |
- name: Dependencies | |
run: | | |
PREFIX=${{ steps.version.outputs.prefix }} | |
sudo ./etc/actions/release/macos/compile_gsl.sh "$PREFIX" $CC $CXX | |
sudo ./etc/actions/release/macos/compile_hdf5.sh "$PREFIX" $CC $CXX | |
- name: Configure | |
run: | | |
PREFIX=${{ steps.version.outputs.prefix }} | |
# tar zxvf AutoGeneratedFile.tar.gz | |
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 | |
# - name: PETSc | |
# run: | | |
# cd 3rdparty/ff-petsc | |
# make petsc-slepc SUDO=sudo | |
# cd - | |
- name: Build | |
run: | | |
./reconfigure | |
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/." | |
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 }} | |
VERSION=${{ steps.version.outputs.version }} | |
./etc/actions/release/macos/create_dmg.sh "$HOME/pkg" "$DMG_DIR" "$VERSION" | |
echo "file=$DMG_DIR.dmg" >>$GITHUB_OUTPUT | |
- name: Upload release | |
uses: AButler/upload-release-assets@v2.0.x | |
with: | |
files: ${{ steps.dmg.outputs.file }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
release-tag: v${{ steps.version.outputs.version }}-testActions |