Skip to content

Add sample app CI validation for PROJ library installation#2

Merged
michalpelka merged 5 commits intomainfrom
copilot/build-sample-app-ci-workflow
Feb 19, 2026
Merged

Add sample app CI validation for PROJ library installation#2
michalpelka merged 5 commits intomainfrom
copilot/build-sample-app-ci-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 16, 2026

Adds a CI step to build and run a sample application that validates the installed PROJ library works correctly. The sample performs a WGS84→UTM transformation and is packaged as a second artifact.

Changes

  • sample_app/main.cpp - C++ application demonstrating coordinate transformation (Berlin: WGS84 → UTM Zone 33N). Validates output is within expected range and returns appropriate exit codes.

  • sample_app/CMakeLists.txt - Build configuration using find_package(PROJ REQUIRED CONFIG) to link against installed library.

  • build_sample.bat - Build script that configures, builds, tests, and packages the sample app using the install_proj output from the main build.

  • .github/workflows/build_win.yml - Extended workflow to build sample app and upload as sample-app-windows artifact (executable + DLLs).

Example Usage

PJ *P = proj_create_crs_to_crs(ctx, "EPSG:4326", "EPSG:32633", NULL);
PJ *P_norm = proj_normalize_for_visualization(ctx, P);
PJ_COORD c_in = proj_coord(13.4050, 52.5200, 0, 0);  // Berlin
PJ_COORD c_out = proj_trans(P_norm, PJ_FWD, c_in);
// c_out.xy.x ≈ 391000, c_out.xy.y ≈ 5820000 (UTM Zone 33N)

The CI now produces two artifacts: the PROJ library installation and a working application that validates it.

Original prompt

This section details on the original issue you should resolve

<issue_title>Build sample app with simple wgs to utm conversion to check installed library</issue_title>
<issue_description>Add step to CI to try build sample app. It can utilize some unittest.
We want to have it as second artifact.</issue_description>

<agent_instructions>please provide pr with CI.
Use install space from CI wokflow. You can try to create second CI wokflow that depends on first one.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@michalpelka
Copy link
Copy Markdown
Collaborator

@copilot agreed with plan, proceed.

Copilot AI and others added 2 commits February 16, 2026 12:15
Co-authored-by: michalpelka <3209244+michalpelka@users.noreply.github.com>
Co-authored-by: michalpelka <3209244+michalpelka@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CI step to build sample app for WGS to UTM conversion Add sample app CI validation for PROJ library installation Feb 16, 2026
Copilot AI requested a review from michalpelka February 16, 2026 12:17
@michalpelka
Copy link
Copy Markdown
Collaborator

michalpelka commented Feb 16, 2026

Ok, tiff is statically linked to proj_9_3.dll.
Can you try to simply ommit generated cmake config and link it manually?
@copilot

Signed-off-by: Michal <michalpelka@gmail.com>
@michalpelka michalpelka force-pushed the copilot/build-sample-app-ci-workflow branch from 7cb79d6 to 0ad00b8 Compare February 17, 2026 00:50
@michalpelka michalpelka marked this pull request as ready for review February 19, 2026 23:02
@michalpelka michalpelka merged commit 3fa0b0b into main Feb 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build sample app with simple wgs to utm conversion to check installed library

2 participants