Skip to content

Commit

Permalink
CI: test -DEMBED_RESOURCE_FILES=ON
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Oct 3, 2024
1 parent 2a3052b commit 032b81f
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/clang_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ jobs:
id: regular
PROJ_CMAKE_BUILD_OPTIONS: ""

- name: EMBED_RESOURCE_FILES
id: EMBED_RESOURCE_FILES
PROJ_CMAKE_BUILD_OPTIONS: "-DEMBED_RESOURCE_FILES=ON"

- name: Without TIFF
id: without_tiff
PROJ_CMAKE_BUILD_OPTIONS: "-DENABLE_TIFF=OFF"
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/fedora_rawhide.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Fedora Rawhide

on:
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:

fedora_rawhide:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v4
id: cache
with:
path: |
${{ github.workspace }}/ccache.tar.gz
key: ${{ runner.os }}-cache-fedora_rawhide-${{ github.run_id }}
restore-keys: ${{ runner.os }}-cache-fedora_rawhide-

- name: Run
run: docker run -e CI -e WORK_DIR="$PWD" -v $PWD:$PWD fedora:rawhide $PWD/.github/workflows/fedora_rawhide/start.sh
31 changes: 31 additions & 0 deletions .github/workflows/fedora_rawhide/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

set -e

dnf install -y cmake clang ccache ninja-build sqlite-devel libtiff-devel libcurl-devel diffutils

cd "$WORK_DIR"

if test -f "$WORK_DIR/ccache.tar.gz"; then
echo "Restoring ccache..."
(cd $HOME && tar xzf "$WORK_DIR/ccache.tar.gz")
fi

export CCACHE_CPP2=yes

ccache -M 500M
ccache -s

mkdir build
cd build
CC=clang CXX=clang++ cmake .. \
-DEMBED_RESOURCE_FILES=ON -DUSE_ONLY_EMBEDDED_RESOURCE_FILES=ON -DUSE_CCACHE=ON -DPROJ_DB_CACHE_DIR=$HOME/.ccache ..
make -j$(nproc)
ctest -j$(nproc)
cd ..

ccache -s

echo "Saving ccache..."
rm -f "$WORK_DIR/ccache.tar.gz"
(cd $HOME && tar czf "$WORK_DIR/ccache.tar.gz" .ccache)

0 comments on commit 032b81f

Please sign in to comment.