Skip to content

Commit

Permalink
add other archs
Browse files Browse the repository at this point in the history
  • Loading branch information
lkeegan committed Nov 8, 2023
1 parent d08ed14 commit 6230e33
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 88 deletions.
156 changes: 78 additions & 78 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@ env:
DUNE_COPASI_VERSION: "ci_fixes_for_dune_copasi_2_xcode"

jobs:
# linux:
# name: Linux
# runs-on: ubuntu-20.04
# env:
# INSTALL_PREFIX: "/opt/smelibs"
# SUDOCMD: "sudo"
# OS_TARGET: "linux"
# CC: "clang"
# CXX: "clang++"
# defaults:
# run:
# shell: bash
# steps:
# - name: Add llvm repo for clang 16 & install
# run: |
# sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
# sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main"
# sudo apt update -yy
# sudo apt install -yy clang-16
# - name: Set clang version
# run: |
# sudo update-alternatives --remove-all clang || echo "nothing to remove"
# sudo update-alternatives --remove-all clang++ || echo "nothing to remove"
# sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100
# sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100
# - uses: actions/checkout@v4
# - name: Build script
# run: ./build.sh
# - uses: actions/upload-artifact@v3
# with:
# path: ./artefacts/*
linux:
name: Linux
runs-on: ubuntu-20.04
env:
INSTALL_PREFIX: "/opt/smelibs"
SUDOCMD: "sudo"
OS_TARGET: "linux"
CC: "clang"
CXX: "clang++"
defaults:
run:
shell: bash
steps:
- name: Add llvm repo for clang 16 & install
run: |
sudo wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main"
sudo apt update -yy
sudo apt install -yy clang-16
- name: Set clang version
run: |
sudo update-alternatives --remove-all clang || echo "nothing to remove"
sudo update-alternatives --remove-all clang++ || echo "nothing to remove"
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100
- uses: actions/checkout@v4
- name: Build script
run: ./build.sh
- uses: actions/upload-artifact@v3
with:
path: ./artefacts/*

macos:
name: MacOS
Expand All @@ -58,51 +58,51 @@ jobs:
with:
path: ./artefacts/*

# win64:
# name: Windows 64-bit
# runs-on: windows-2022
# env:
# INSTALL_PREFIX: "/c/smelibs"
# SUDOCMD: ""
# OS_TARGET: "win64-mingw"
# defaults:
# run:
# shell: msys2 {0}
# steps:
# - uses: actions/checkout@v4
# - uses: msys2/setup-msys2@v2
# with:
# msystem: MINGW64
# update: true
# install: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake make git dos2unix
# - name: Build script
# run: ./build.sh
# - uses: actions/upload-artifact@v3
# with:
# path: ./artefacts/*
win64:
name: Windows 64-bit
runs-on: windows-2022
env:
INSTALL_PREFIX: "/c/smelibs"
SUDOCMD: ""
OS_TARGET: "win64-mingw"
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake make git dos2unix
- name: Build script
run: ./build.sh
- uses: actions/upload-artifact@v3
with:
path: ./artefacts/*

# release:
# name: Upload Binaries to GitHub Release
# needs: [linux, macos, win64]
# runs-on: ubuntu-latest
# # upload binaries to github release if commit is tagged
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
# steps:
# - uses: dev-drprasad/delete-older-releases@v0.2.1
# with:
# repo: spatial-model-editor/sme_deps
# keep_latest: 5
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - uses: actions/download-artifact@v3
# with:
# name: artifact
# path: binaries
# - name: Upload binaries to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: binaries/*
# tag: ${{ github.ref }}
# overwrite: true
# file_glob: true
release:
name: Upload Binaries to GitHub Release
needs: [linux, macos, win64]
runs-on: ubuntu-latest
# upload binaries to github release if commit is tagged
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
steps:
- uses: dev-drprasad/delete-older-releases@v0.3.2
with:
repo: spatial-model-editor/sme_deps
keep_latest: 5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v3
with:
name: artifact
path: binaries
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: binaries/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
15 changes: 5 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ else
fi

# temp hack to remove muparser
rm -rf $DEPSDIR/lib/libmuparser.a
rm -rf $DEPSDIR/lib/libmuparser*
rm -rf $DEPSDIR/lib/cmake/muparser
rm -rf $DEPSDIR/include/muParser*

Expand All @@ -48,7 +48,6 @@ export CMAKE_OSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}"
export DUNE_COPASI_USE_STATIC_DEPS=ON
export CMAKE_INSTALL_PREFIX=$DEPSDIR
export MAKE_OPTIONS="-j2 VERBOSE=1"
# -fexperimental-library for clang/libc++ to enable <execution>
export CMAKE_CXX_FLAGS="'-fvisibility=hidden'"
export BUILD_SHARED_LIBS=OFF
export CMAKE_DISABLE_FIND_PACKAGE_MPI=ON
Expand Down Expand Up @@ -85,11 +84,7 @@ sed -i.bak 's|find_package(Python|#find_package(Python|' ${INSTALL_PREFIX}/share
sed -i.bak 's|dune_python_find_package(|#dune_python_find_package(|' ${INSTALL_PREFIX}/share/dune/cmake/modules/DunePythonCommonMacros.cmake
cat ${INSTALL_PREFIX}/share/dune/cmake/modules/DunePythonCommonMacros.cmake

/opt/smelibs/bin/dune-copasi --help

otool -L /opt/smelibs/bin/dune-copasi

# ls $DEPSDIR
#mkdir artefacts
#cd artefacts
#tar -zcf sme_deps_${OS_TARGET}.tgz $DEPSDIR/*
ls $DEPSDIR
mkdir artefacts
cd artefacts
tar -zcf sme_deps_${OS_TARGET}.tgz $DEPSDIR/*

0 comments on commit 6230e33

Please sign in to comment.