build manylinux #45
Workflow file for this run
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: build manylinux | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
workflow_call: | |
env: | |
do_dynamic: true | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y g++-12 libboost-all-dev libeigen3-dev libtiff-dev libjpeg-dev libjbig-dev liblzma-dev libzstd-dev libwebp-dev libdeflate-dev libleptonica-dev liblerc-dev | |
- name: Check Packages Versions | |
run: | | |
dpkg-query -W -f='${binary:Package} ${Version}\n' g++-12 libboost-all-dev libeigen3-dev libtiff-dev libjpeg-dev libjbig-dev liblzma-dev libzstd-dev libwebp-dev libdeflate-dev libleptonica-dev liblerc-dev > new_pkgs_ubuntu.txt | |
cat new_pkgs_ubuntu.txt | |
- name: Get Environment | |
if: ${{ env.do_dynamic == 'true' }} | |
run: | | |
DISTRIBUTION=$( lsb_release --short --id 2>/dev/null ) | |
CODENAME=$( lsb_release --short --codename 2>/dev/null ) | |
MACHINE=$( uname --machine 2>/dev/null ) | |
echo "SUFFIX=".${DISTRIBUTION}.${CODENAME}.${MACHINE}"" >> $GITHUB_ENV | |
- name: BuildSuffix | |
if: ${{ env.do_dynamic == 'true' }} | |
run: | | |
cd Cell2Fire | |
make clean | |
make | |
ldd Cell2Fire > ldd${{ env.SUFFIX }}.txt | |
mv Cell2Fire Cell2Fire${{ env.SUFFIX }} | |
- name: Upload | |
if: ${{ env.do_dynamic == 'true' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binaries${{ env.SUFFIX }} | |
path: | | |
Cell2Fire/ldd${{ env.SUFFIX }}.txt | |
Cell2Fire/Cell2Fire${{ env.SUFFIX }} | |
if-no-files-found: error | |
- name: BuildStatic | |
run: | | |
cd Cell2Fire | |
make clean | |
make -f makefile.static > ldd_manylinux.txt 2>&1 || true | |
ldd Cell2Fire > ldd_manylinux.txt 2>&1 || true | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binaries-manylinux-x86_64 | |
path: | | |
Cell2Fire/ldd_manylinux.txt | |
Cell2Fire/Cell2Fire | |
if-no-files-found: error | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
container: ubuntu:jammy | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
apt update | |
apt install -y unzip lsb-release | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: binaries* | |
path: Cell2Fire | |
merge-multiple: true | |
- name: chmod | |
run: | | |
chmod +x Cell2Fire/Cell2Fire* | |
- name: TestManyLinux | |
run: | | |
cd test | |
bash test.sh | |
- name: Get Environment | |
if: ${{ env.do_dynamic == 'true' }} | |
id: get_env | |
run: | | |
DISTRIBUTION=$( lsb_release --short --id 2>/dev/null ) | |
CODENAME=$( lsb_release --short --codename 2>/dev/null ) | |
MACHINE=$( uname --machine 2>/dev/null ) | |
echo "SUFFIX=".${DISTRIBUTION}.${CODENAME}.${MACHINE}"" >> $GITHUB_ENV | |
- name: TestSuffixFail | |
if: ${{ env.do_dynamic == 'true' }} | |
continue-on-error: true | |
run: | | |
cd test | |
bash test.sh ${{ env.SUFFIX }} | |
- name: PrepareSuffix | |
if: ${{ env.do_dynamic == 'true' }} | |
run: | | |
apt update | |
apt install -y libtiff5 libstdc++6 libgomp1 libgcc1 | |
- name: TestSuffix | |
if: ${{ env.do_dynamic == 'true' }} | |
run: | | |
cd test | |
bash test.sh ${{ env.SUFFIX }} |