[Test] Installer for Debian 12 #246
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
# This is a basic workflow to help you get started with Actions | |
name: Ubuntu builds | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push only for the master branch | |
push: | |
branches: [master] | |
paths-ignore: | |
- '**/README.md' | |
pull_request: | |
branches: [master] | |
paths-ignore: | |
- '**/README.md' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
ubuntu_build: | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.distro }} | |
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') }} | |
strategy: | |
fail-fast: true | |
matrix: | |
distro: | |
- 'ubuntu-24.04' | |
- 'ubuntu-22.04' | |
- 'ubuntu-20.04' | |
include: | |
- distro: 'ubuntu-24.04' | |
pre: 'noble' | |
ldflags: '-lgdal -lcurl -L/usr/lib/x86_64-linux-gnu -lz -lwebkit2gtk-4.1 -lEGL -ljavascriptcoregtk-4.1' | |
- distro: 'ubuntu-22.04' | |
pre: 'jammy' | |
ldflags: '-lgdal -lcurl -L/usr/lib/x86_64-linux-gnu -lz -lwebkit2gtk-4.0 -lEGL -ljavascriptcoregtk-4.0' | |
- distro: 'ubuntu-20.04' | |
pre: 'focal' | |
ldflags: '-lgdal -lcurl -L/usr/lib/x86_64-linux-gnu -lz -lwebkit2gtk-4.0 -lEGL -ljavascriptcoregtk-4.0' | |
env: | |
platform: ${{ matrix.distro }} | |
GEODA_VER: '1.22.0' | |
TARGET_OS: ${{ matrix.pre }} | |
EXTRA_GEODA_LD_FLAGS: ${{ matrix.ldflags }} | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Prepare on ${{ matrix.distro }} | |
run: | | |
chmod +x BuildTools/ubuntu/create_deps.sh | |
chmod +x BuildTools/ubuntu/install.sh | |
echo ${{ env.TARGET_OS }} | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get update -y | |
sudo apt-get install -y ca-certificates libgnutls30 | |
echo '-k' > ~/.curlrc | |
sudo apt-get install -y libpq-dev | |
sudo apt-get install -y gdal-bin | |
sudo apt-get install -y libgdal-dev | |
sudo apt-get install -y unzip cmake dh-autoreconf libgtk-3-dev libgl1-mesa-dev libglu1-mesa-dev | |
export OS=${{ env.TARGET_OS }} | |
if [ $OS = 'jammy' ] ; then | |
sudo apt-get install -y libwebkit2gtk-4.0-dev | |
elif [ $OS = 'focal' ] ; then | |
sudo apt-get install -y libwebkit2gtk-4.0-dev | |
elif [ $OS = 'noble' ] ; then | |
sudo apt-get install -y libgtk-4-dev libwebkit2gtk-4.1-dev | |
else | |
sudo apt-get install -y libwebkitgtk-3.0-dev | |
fi | |
- uses: actions/cache@v3 | |
id: cache | |
with: | |
path: | | |
BuildTools/ubuntu/libraries | |
BuildTools/ubuntu/temp | |
key: ${{ runner.os }}-${{ env.TARGET_OS }}-deps-cache-${{ hashFiles('BuildTools/ubuntu/create_deps.sh') }} | |
# Create Deps | |
- if: steps.cache.outputs.cache-hit != 'true' | |
name: Create Dependencies | |
run: | | |
export WORK_DIR=$PWD | |
export OS=${{ env.TARGET_OS }} | |
export VER=${{ env.GEODA_VER }} | |
export APT="sudo apt-get" | |
cd BuildTools/ubuntu | |
./create_deps.sh | |
# Build GeoDa | |
- name: Build GeoDa | |
run: | | |
mkdir -p o | |
chmod 755 o | |
export WORK_DIR=$PWD | |
export OS=${{ env.TARGET_OS }} | |
export VER=${{ env.GEODA_VER }} | |
export EXTRA_GEODA_LD_FLAGS='${{ env.EXTRA_GEODA_LD_FLAGS }}' | |
export APT="sudo apt-get" | |
cd BuildTools/ubuntu | |
./install.sh | |
# Upload artifact | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: GeoDa-${{ env.GEODA_VER }}-${{ env.TARGET_OS }} | |
path: ${{ github.workspace }}/BuildTools/ubuntu/geoda_${{ env.GEODA_VER }}-1${{ env.TARGET_OS }}1_amd64.deb |