Update gdal 0.15 #134
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: Release | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
workflow_dispatch: | ||
jobs: | ||
tgz: | ||
name: Build release tgz | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ['ubuntu-22.04', 'macOS-latest'] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- name: Cargo build | ||
run: cargo build --release --no-default-features | ||
- name: Tar | ||
run: | | ||
VERSION=$(basename ${{ github.ref }}) | ||
target=$(gcc -dumpmachine) | ||
cd target/release | ||
strip t_rex | ||
tar czf ../../t-rex-$VERSION-$target.tar.gz t_rex | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.run_id }} | ||
path: t-rex-*.tar.gz | ||
retention-days: 1 | ||
deb: | ||
runs-on: ubuntu-22.04 | ||
container: ${{ matrix.container }} | ||
strategy: | ||
matrix: | ||
include: | ||
- variant: jammy | ||
container: null | ||
sudo: sudo | ||
# - variant: focal | ||
# container: null | ||
# sudo: sudo | ||
- variant: bookworm | ||
container: rust:bookworm | ||
sudo: null | ||
- variant: bullseye | ||
container: rust:bullseye | ||
sudo: null | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Install cargo-deb | ||
run: cargo install cargo-deb | ||
- name: Install build-dependencies | ||
run: | | ||
${{ matrix.sudo }} apt update | ||
${{ matrix.sudo }} apt install -y libgdal-dev | ||
- name: Build & package | ||
run: | | ||
cargo deb --variant=${{ matrix.variant }} | ||
dpkg -I target/debian/t-rex*.deb | ||
dpkg -c target/debian/t-rex*.deb | ||
- name: Install package | ||
run: ${{ matrix.sudo }} dpkg -i target/debian/*.deb | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.run_id }} | ||
path: target/debian/*.deb | ||
retention-days: 1 | ||
# rpm: | ||
# runs-on: ubuntu-latest | ||
# container: ${{ matrix.container }} | ||
# strategy: | ||
# matrix: | ||
# container: ['centos:8'] | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/checkout@v3 | ||
# - name: Install toolchain | ||
# uses: actions-rs/toolchain@v1 | ||
# with: | ||
# profile: minimal | ||
# toolchain: stable | ||
# override: true | ||
# - name: Install cargo-rpm | ||
# run: | | ||
# yum install gcc rpm-build -y | ||
# cargo install cargo-rpm | ||
# - name: Install build-dependencies | ||
# run: | | ||
# yum install openssl-devel -y | ||
# # yum install epel-release -y | ||
# # yum install --enablerepo=powertools gdal-devel -y | ||
# # RH UBI image registry.access.redhat.com/ubi8/ubi | ||
# # rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | ||
# # yum install --enablerepo=ubi-8-codeready-builder gdal-devel | ||
# - name: Build & package | ||
# run: | | ||
# ln -s packaging/rpm .rpm | ||
# cargo rpm build --output target/rpm/ | ||
# - name: Upload artifact | ||
# uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: ${{ github.run_id }} | ||
# path: target/rpm/*.rpm | ||
# retention-days: 1 | ||
msi: | ||
name: Build MSI | ||
runs-on: windows-2019 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install GDAL | ||
shell: bash | ||
run: | | ||
curl -S -O https://download.gisinternals.com/sdk/downloads/release-1928-x64-dev.zip | ||
7z x release-1928-x64-dev.zip | ||
find release-1928-x64 -ls >release-1928-x64.txt | ||
rm -rf release-1928-x64/bin/ms release-1928-x64/bin/proj release-1928-x64/bin/gdal/{csharp,java,python} | ||
mv release-1928-x64/bin/gdal/apps/* release-1928-x64/bin/ | ||
- name: Build | ||
shell: bash | ||
run: | | ||
rustc -Vv | ||
cargo -V | ||
vswhere | ||
export GDAL_HOME=$PWD/release-1928-x64 | ||
export GDAL_DATA=$GDAL_HOME/bin/gdal-data | ||
export PATH=$GDAL_HOME/bin:$PATH | ||
ogrinfo --version | ||
ogrinfo --formats | ||
export GDAL_VERSION=$(ogrinfo --version | sed 's/GDAL \(.*\), .*/\1/') | ||
echo $PATH | ||
cargo build --release | ||
target/release/t_rex --version | ||
- name: Create msi | ||
shell: bash | ||
run: | | ||
export VERSION=$(basename ${{ github.ref }}) | ||
export RELEASE_DIR=$PWD/target/release | ||
export GDAL_HOME=$PWD/release-1928-x64 | ||
cd packaging/windows | ||
"$WIX/bin/heat" dir $GDAL_HOME/bin -var wix.GdalSrcDir -dr BINDIR -nologo -srd -ag -sw5150 -cg gdal -o gdal.wxs | ||
"$WIX/bin/candle" -nologo gdal.wxs | ||
"$WIX/bin/candle" -nologo t-rex.wxs | ||
"$WIX/bin/light" -nologo -dBuildDir=$RELEASE_DIR -dGdalSrcDir=$GDAL_HOME/bin -sice:ICE80 -o t-rex-$VERSION.msi t-rex.wixobj gdal.wixobj | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.run_id }} | ||
path: packaging/windows/t-rex-*.msi | ||
retention-days: 1 | ||
release: | ||
needs: [tgz, deb, rpm, msi] | ||
Check failure on line 184 in .github/workflows/release.yml GitHub Actions / ReleaseInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Retrieve saved artefacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ github.run_id }} | ||
path: packages | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body: | | ||
See [CHANGELOG](https://github.com/t-rex-tileserver/t-rex/blob/master/CHANGELOG.md) | ||
files: packages/* | ||
docker-release: | ||
name: Docker release | ||
needs: [release] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get version tag | ||
id: version | ||
run: | | ||
VERSION=${GITHUB_REF:11} | ||
echo ::set-output name=tag::$VERSION | ||
# refs/tags/v0.14.3-beta1 -> 0.14.3.beta1 | ||
echo ::set-output name=deb::${VERSION/-/.} | ||
- name: Build and publish | ||
uses: elgohr/Publish-Docker-Github-Action@v5 | ||
env: | ||
DEB_URL: https://github.com/t-rex-tileserver/t-rex/releases/download/v${{ steps.version.outputs.tag }}/t-rex_${{ steps.version.outputs.deb }}-1.focal_amd64.deb | ||
with: | ||
name: sourcepole/t-rex | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
workdir: packaging/docker | ||
buildargs: DEB_URL | ||
tag_names: true |