Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding 2022.6 version on build workflow #135

Merged
merged 13 commits into from
Aug 18, 2022
20 changes: 12 additions & 8 deletions .github/workflows/unix_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
cubit: [2021.4, 2021.5, 2021.11]
cubit: [2021.4, 2021.5, 2021.11, 2022.4]
os: [ubuntu]
os_version: [20.04, 21.04]
os_version: [20.04, 22.04]
include:
- os: ubuntu
os_version: 18.04
Expand All @@ -48,7 +48,7 @@ jobs:
os_version: '10.10' # using a 'string' here as the 0 gets rounded away otherwise
cubit: 2021.11


name: 'Cubit ${{ matrix.cubit }} Build for ${{ matrix.os }} ${{ matrix.os_version }} of Svalinn Plugin'

container:
Expand Down Expand Up @@ -89,6 +89,10 @@ jobs:
BASE=Coreform-Cubit-2021.11%2B21637_35609873
CUBIT_BASE_NAME=Coreform-Cubit-2021.11
HDF5_PATH=/usr/local/HDF_Group/HDF5/1.12.0
elif [ "${{ matrix.cubit }}" == "2022.4" ]; then
BASE=Coreform-Cubit-2022.4%2B26186_e1209cf7
CUBIT_BASE_NAME=Coreform-Cubit-2022.4
HDF5_PATH=/usr/local/HDF_Group/HDF5/1.12.0
fi

SUFFIX=Lin64
Expand Down Expand Up @@ -116,12 +120,12 @@ jobs:

echo "" >> ${HOME}/.bash_profile
echo "source $GITHUB_WORKSPACE/scripts/unix_share_build.sh" >> $HOME/.bash_profile

- name: Initial setup
shell: bash -l {0}
run: |
${system}_install_prerequisites

- name: Downloading packages
shell: bash -l {0}
run: |
Expand Down Expand Up @@ -156,7 +160,7 @@ jobs:
- name: Build plugin
shell: bash -l {0}
run: |
build_plugin
build_plugin

- name: Prepare package
shell: bash -l {0}
Expand All @@ -169,8 +173,8 @@ jobs:
with:
name: svalinn-plugin_${{ matrix.os }}-${{ matrix.os_version }}_cubit_${{ matrix.cubit }}.tgz
path: ${{ github.workspace }}/release/svalinn-plugin_${{ matrix.os }}-${{ matrix.os_version }}_cubit_${{ matrix.cubit }}.tgz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

- if: github.event_name == 'release'
name: Upload binaries into the release
uses: svenstaro/upload-release-action@v2
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/unix_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ env:

jobs:
main:
runs-on: macos-10.15
runs-on: macos-11
strategy:
matrix:
cubit: [17.1.0, 2021.4, 2021.5, 2021.11]
cubit: [17.1.0, 2021.4, 2021.5, 2021.11, 2022.4]

name: 'Cubit ${{ matrix.cubit }} Build for MacOS of Svalinn Plugin'

Expand Down Expand Up @@ -63,6 +63,10 @@ jobs:
BASE=Coreform-Cubit-2021.11%2B21637_35609873
CUBIT_BASE_NAME=Coreform-Cubit-2021.11
HDF5_PATH=/usr/local/HDF_Group/HDF5/1.12.0
elif [ "${{ matrix.cubit }}" == "2022.4" ]; then
BASE=Coreform-Cubit-2022.4%2B26186_e1209cf7
CUBIT_BASE_NAME=Coreform-Cubit-2022.4
HDF5_PATH=/usr/local/HDF_Group/HDF5/1.12.0
fi

SUFFIX=Mac64
Expand All @@ -88,12 +92,12 @@ jobs:

echo "" >> ${HOME}/.bash_profile
echo "source $GITHUB_WORKSPACE/scripts/unix_share_build.sh" >> $HOME/.bash_profile

- name: Initial setup
shell: bash -l {0}
run: |
${system}_install_prerequisites

- name: Downloading packages
shell: bash -l {0}
run: |
Expand Down Expand Up @@ -128,7 +132,7 @@ jobs:
- name: Build plugin
shell: bash -l {0}
run: |
build_plugin
build_plugin

- name: Prepare package
shell: bash -l {0}
Expand All @@ -141,8 +145,8 @@ jobs:
with:
name: svalinn-plugin_${{env.OS}}_cubit_${{ matrix.cubit }}.tgz
path: ${{ github.workspace }}/release/svalinn-plugin_${{env.OS}}_cubit_${{ matrix.cubit }}.tgz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

- if: github.event_name == 'release'
name: Upload binaries into the release
uses: svenstaro/upload-release-action@v2
Expand Down
15 changes: 8 additions & 7 deletions scripts/unix_share_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function linux_install_prerequisites() {

function setup() {
unset LD_LIBRARY_PATH

echo "Building the Cubit plugin in ${CURRENT}\\${PLUGIN_DIR}"
cd ${CURRENT}
mkdir ${PLUGIN_DIR}
Expand Down Expand Up @@ -180,7 +180,7 @@ function mac_setup_cubit() {
hdiutil attach cubit_eula.dmg.cdr -mountpoint /Volumes/Cubit
mv /Volumes/Cubit/*.app /Applications/
rm -rf cubit.dmg

# removing app_loger that seems to not be present in Cubit 2020.2
if [ "${1}" = "2020.2" ]; then #|| [ "$1" == "2021.3" ] || [ "$1" == "2021.4" ]; then
remove_app_logger
Expand All @@ -189,7 +189,7 @@ function mac_setup_cubit() {
cd /Applications

# 17.1.0 comes with a separate SDK. It is unclear yet on how it is supposed to be installed and used.
# this is a way to have it working...
# this is a way to have it working...
if [ "$1" == "17.1.0" ] ; then
cd ${CUBIT_PATH}
$SUDO tar -xzf ${FOLDER_PKG}/${CUBIT_SDK_PKG}
Expand All @@ -211,11 +211,11 @@ function mac_setup_cubit() {
}

function linux_setup_cubit() {

cd ${FOLDER_PKG}
$SUDO apt-get install -y ./${CUBIT_PKG}

if [ "$1" == "2021.3" ] || [ "$1" == "2021.4" ] || [ "$1" == "2021.5" ] || [ "$1" == "2021.11" ] ; then
if [ "$1" == "2021.3" ] || [ "$1" == "2021.4" ] || [ "$1" == "2021.5" ] || [ "$1" == "2021.11" ] || [ "$1" == "2022.4" ] ; then
return
fi

Expand All @@ -230,6 +230,7 @@ function linux_setup_cubit() {
function build_plugin(){
cd ${PLUGIN_ABS_PATH}
cd Cubit-plugin
git config --global --add safe.directory ${GITHUB_WORKSPACE}
git submodule update --init
cd ../
mkdir -pv bld
Expand Down Expand Up @@ -285,8 +286,8 @@ function mac_build_plugin_pkg(){

# Copy all needed libraries into current directory
cp -pPv ${PLUGIN_ABS_PATH}/lib/* .
cp /usr/local/opt/szip/lib/libsz.2.dylib .
install_name_tool -change /usr/local/opt/szip/lib/libsz.2.dylib @rpath/libsz.2.dylib libsvalinn_plugin.so
cp /usr/local/opt/libaec/lib/libsz.dylib .
install_name_tool -change /usr/local/opt/libaec/lib/libsz.dylib @rpath/libsz.dylib libsvalinn_plugin.so

# restoring correct RPATH for 17.1 (bin does not exist as it is not shipped with SDK)
if [ "$1" == "17.1.0" ] ; then
Expand Down