Skip to content

Commit

Permalink
Fix assets due to unproper behaviour of pyinstaller (#884)
Browse files Browse the repository at this point in the history
Fix #882 

- Add workflow run on branch release/* to trigger workflow even when
conflict are detected against base branch (often develop)
- Pin pyinstaller version to 4 for unix to avoid an issue with version 6
- Differenciate pyinstaller version between platforms to avoid
incompatibility issues on Windows between mismatching version of python,
pip and pyinstaller
  • Loading branch information
JasonMarechal25 authored Jul 31, 2024
1 parent caf2805 commit d729029
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 73 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/build_centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches:
- develop
- dependabot/*
- release/*
pull_request:
release:
types: [ created ]
Expand Down Expand Up @@ -107,14 +108,6 @@ jobs:
with:
cmake-version: '3.28.x'

#Lukka's action doesn't work on runner.
#jwlawson's action doesn't work in ACT
#I left this here to quicly switch between one or the other
# - uses: lukka/get-cmake@latest
# with:
# useLocalCache: false
# useCloudCache: true

- name: Checkout xpressmp linux
uses: actions/checkout@v3 #keep v3
with:
Expand All @@ -132,18 +125,12 @@ jobs:
os: centos7
os-full-name: CentOS-7.9.2009

- name: openmpi-devel
- name: repo update
run: |
yum update
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo
yum install -y openmpi-devel
- name: Compile Boost
uses: ./.github/workflows/compile-boost
with:
prefix: "${GITHUB_WORKSPACE}/deps"
- name: Install dependencies
run: |
Expand Down Expand Up @@ -175,8 +162,6 @@ jobs:
- name: Configure
run: |
source /opt/rh/devtoolset-10/enable
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib64/openmpi/bin:$PATH
cmake -B _build -S . \
-DBUILD_TESTING=ON \
-DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/deps \
Expand All @@ -202,8 +187,8 @@ jobs:
timeout-minutes: 120
shell: bash
run: |
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib64/openmpi/bin:${{ env.XPRS_LIB_Path_CONTAINER }}:$PATH
export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin/:$PATH
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:${{ env.XPRS_LIB_Path_CONTAINER }}
export XPRESS=${{ env.XPRESS_CONTAINER }}
cd _build
ctest -C Release --output-on-failure -L "unit|benders|lpnamer|medium"
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/build_oracle8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches:
- develop
- dependabot/*
- release/*
pull_request:
release:
types: [ created ]
Expand Down Expand Up @@ -62,12 +63,11 @@ jobs:
steps:
- name: Install System
run: |
dnf install -y epel-release git wget rpm-build redhat-lsb-core openmpi-devel
dnf install -y epel-release git wget rpm-build redhat-lsb-core
dnf install -y unzip libuuid-devel gcc-toolset-10-toolchain python3-devel zlib-devel
#make gcc &co available system wide and "action wide"
source /opt/rh/gcc-toolset-10/enable
echo $PATH >> $GITHUB_PATH
- run: |
dnf module install -y nodejs:20/common
Expand All @@ -80,11 +80,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true

- name: Compile Boost
uses: ./.github/workflows/compile-boost
with:
prefix: "${GITHUB_WORKSPACE}/deps"

- name: Checkout xpressmp linux
uses: actions/checkout@v4
Expand Down Expand Up @@ -132,8 +127,6 @@ jobs:

- name: Configure
run: |
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib64/openmpi/bin:$PATH
cmake -B _build -S . \
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=Release \
Expand All @@ -151,8 +144,8 @@ jobs:
timeout-minutes: 120
shell: bash
run: |
export PATH=/usr/lib64/openmpi/bin:$PATH
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:${{ env.XPRS_LIB_Path_CONTAINER }}:$LD_LIBRARY_PATH
export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin/:$PATH
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:${{ env.XPRS_LIB_Path_CONTAINER }}
export XPRESS=${{ env.XPRESS_CONTAINER }}
cd _build
ctest -C Release --output-on-failure -L "unit|benders|lpnamer|medium"
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/build_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- main
- develop
- dependabot/*
- release/*
pull_request:
release:
types: [ created ]
Expand Down Expand Up @@ -55,7 +56,6 @@ jobs:
sudo apt-get update --fix-missing
sudo apt-get install -y ccache
sudo apt-get install -y g++-10 gcc-10
sudo apt-get install -y libopenmpi-dev

- name: ccache
Expand Down Expand Up @@ -85,11 +85,6 @@ jobs:
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
- name: Compile Boost
uses: ./.github/workflows/compile-boost
with:
prefix: "${GITHUB_WORKSPACE}/deps"

- uses: lukka/get-cmake@latest
with:
useLocalCache: false
Expand Down Expand Up @@ -153,7 +148,7 @@ jobs:
- name: Test
run: |
export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin/:$PATH
export PATH=${GITHUB_WORKSPACE}/_build/vcpkg_installed/x64-linux/tools/openmpi/bin:$PATH
cd _build
ctest -C Release --output-on-failure -L "medium|unit|benders|lpnamer"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- main
- develop
- dependabot/*
- release/*
pull_request:
release:
types: [ created ]
Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/compile-boost/action.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ runs:
- id: download-extract
shell: bash
run: |
export LD_LIBRARY_PATH=/usr/lib64/openmpi/lib:$LD_LIBRARY_PATH
export PATH=/usr/lib64/openmpi/bin:$PATH
mkdir -p deps
wget https://github.com/AntaresSimulatorTeam/Antares_Simulator/releases/download/v${{inputs.antares-version}}/antares-${{inputs.antares-version}}-${{inputs.os-full-name}}${{inputs.variant}}.tar.gz
tar -xvf antares-${{inputs.antares-version}}-${{inputs.os-full-name}}${{inputs.variant}}.tar.gz -C deps --strip-components=1
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,7 @@ jobs:
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
sudo update-alternatives --set cc /usr/bin/gcc
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
sudo update-alternatives --set c++ /usr/bin/g++
- name: Compile Boost
uses: ./.github/workflows/compile-boost
with:
prefix: "${GITHUB_WORKSPACE}/deps"
sudo update-alternatives --set c++ /usr/bin/g++
- name: Read antares-solver version
id: antares-version
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
wheel
pyinstaller>=4.3
pyinstaller==4.5.1; platform_system=='Linux' #Version 6 cause issue when packaging mpi see #882
pyinstaller>=4.5.1; platform_system=='Windows' #Issues with 4.5 on Windows. Proper condition should be on python version
pyyaml
dataclasses
psutil==5.8.0
9 changes: 3 additions & 6 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@
"coin-or-cbc",
{
"name": "boost-mpi",
"version>=": "1.81.0",
"platform": "windows"
"version>=": "1.81.0"
},
{
"name": "boost-program-options",
"version>=": "1.81.0",
"platform": "windows"
"version>=": "1.81.0"
},
{
"name": "boost-algorithm",
"version>=": "1.81.0",
"platform": "windows"
"version>=": "1.81.0"
},
"yaml-cpp",
{
Expand Down

0 comments on commit d729029

Please sign in to comment.