Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarnotel committed Mar 8, 2024
1 parent 5d90350 commit 8f2410a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 27 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/release-dmg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,32 @@ jobs:
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: 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: 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 }}
tar zxvf AutoGeneratedFile.tar.gz
./configure --enable-optim --enable-generic --enable-download --enable-m64 \
--prefix="$PREFIX" \
Expand All @@ -95,6 +86,7 @@ jobs:
- 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"
Expand All @@ -109,8 +101,9 @@ jobs:
id: dmg
run: |
DMG_DIR=${{ steps.version.outputs.dmg_dir }}
VERSION=${{ steps.version.outputs.version }}
sudo ./etc/actions/release/macos/create_dmg.sh "$HOME/pkg" "$DMG_DIR"
sudo ./etc/actions/release/macos/create_dmg.sh "$HOME/pkg" "$DMG_DIR" "$VERSION"
echo "file=$DMG_DIR.dmg" >>$GITHUB_OUTPUT
Expand Down
3 changes: 3 additions & 0 deletions etc/actions/release/macos/create_dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ set -x

PACKAGE_DIR=$1
DMG_BASENAME=$2
VERSION=$3

mkdir "$HOME/$DMG_BASENAME"
mv "$PACKAGE_DIR/Applications/FreeFem++.app" "$HOME/$DMG_BASENAME"
cp ./bin/script/Install-app.sh "$HOME/$DMG_BASENAME"
FFTESTDIR=$(find . -name Laplace.edp)
sed -e "s/@VV@/$VERSION/" -e "s%@APPFF@%$DMG_BASENAME%" -e s%@FFTEST@%$FFTESTDIR% <./bin/script/README.md.in >"$HOME/$DMG_BASENAME/README.md"

hdiutil create -srcfolder "$HOME/$DMG_BASENAME" -fs HFS+ "$DMG_BASENAME.dmg"
6 changes: 0 additions & 6 deletions etc/actions/release/macos/fix_fortran.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,4 @@ FORTRAN_FIX="$HOME/fortran-fix"
mkdir "$FORTRAN_FIX"
find "$PACKAGE_DIR/$PREFIX" -name '*.dylib' >"$FORTRAN_FIX/dylib-ff.txt"

# LIB_FORTRAN=$(grep gfortran $PREFIX/gnu/list-dylib-gfortran)
# LIB_QUADMATH=$(grep libquadmath $PREFIX/gnu/list-dylib-gfortran)
# LIB_FORTRAN_OLD_DIR=$(dirname "$LIB_FORTRAN")
# LIB_FORTRAN_DYLIB=$(basename "$LIB_FORTRAN")
# LIB_QUADMATH_DYLIB=$(basename "$LIB_QUADMATH")

./bin/change-dylib-gfortran-2 "$PREFIX/gnu" $(cat "$FORTRAN_FIX/dylib-ff.txt")

0 comments on commit 8f2410a

Please sign in to comment.