Skip to content
Open

CI #1

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7631c6c
add ci
TheWillard Sep 21, 2025
68f0332
add libgimp-3.0-dev
TheWillard Sep 21, 2025
943c546
update?
TheWillard Sep 21, 2025
abbe9d9
update2?
TheWillard Sep 21, 2025
829c96b
ppa + cmake
TheWillard Sep 22, 2025
e96077b
libgexiv2-dev & upload
TheWillard Sep 22, 2025
2efce77
win clang?
TheWillard Sep 22, 2025
5364018
.
TheWillard Sep 22, 2025
51f7d49
s
TheWillard Sep 22, 2025
316d1cb
ninja
TheWillard Sep 22, 2025
c721227
pacboy?
TheWillard Sep 22, 2025
1ef2aa5
remove clang?
TheWillard Sep 22, 2025
1cf777b
rust
TheWillard Sep 22, 2025
3810de2
windoofs
TheWillard Sep 22, 2025
ce1a652
?
TheWillard Sep 22, 2025
648592c
path?
TheWillard Sep 22, 2025
421827a
a
TheWillard Sep 22, 2025
b65bf09
a
TheWillard Sep 22, 2025
de9a9c1
a
TheWillard Sep 22, 2025
bc6629e
add glib
TheWillard Sep 23, 2025
e8b9beb
maybe
TheWillard Sep 23, 2025
c4f1af9
icant
TheWillard Sep 23, 2025
015b3ec
a
TheWillard Sep 23, 2025
4edce06
a
TheWillard Sep 23, 2025
1217af5
target
TheWillard Sep 23, 2025
ac42ad2
x86_64-pc-windows-gnu
TheWillard Sep 23, 2025
a550691
a
TheWillard Sep 23, 2025
cb78b57
clang env pkgconfig
TheWillard Sep 23, 2025
054da66
a
TheWillard Sep 23, 2025
00c79cf
a
TheWillard Sep 23, 2025
4f1f223
a
TheWillard Sep 23, 2025
0f54b49
a
TheWillard Sep 23, 2025
41fc462
links
TheWillard Sep 23, 2025
2e2c71b
a
TheWillard Sep 23, 2025
cf5c03e
ci final?
TheWillard Sep 23, 2025
4f36545
subsystem
TheWillard Sep 23, 2025
a23959e
remove gimp link aff
TheWillard Sep 25, 2025
03ed235
unused env
TheWillard Sep 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Build

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
BUILD_TYPE: Release

jobs:
build-ubuntu:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Install packages
run: |
sudo apt-get update
sudo apt install -y pkg-config cmake
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntuhandbook1/gimp-3
sudo apt install -y gimp libgimp-3.0-0 libgimp-3.0-dev libgexiv2-dev

- name: Configure CMake
run: >
cmake
-DCMAKE_BUILD_TYPE:STRING=${{env.BUILD_TYPE}}
-DCMAKE_C_COMPILER:FILEPATH=clang
-DCMAKE_CXX_COMPILER:FILEPATH=clang++
-S "${{ github.workspace }}"
-B "${{ github.workspace }}/build/"

- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

- name: Upload plugin
uses: actions/upload-artifact@v4
with:
name: arma-gimp-plugin
path: "${{ github.workspace }}/build/arma-gimp-plugin"

build-windows:
runs-on: windows-latest

defaults:
run:
shell: msys2 {0}

steps:
- uses: msys2/setup-msys2@v2
id: msys2
with:
msystem: clang64
update: true
pacboy: >-
toolchain:p
cmake:p
ninja:p
rustup:p
pkgconf:p
glib2:p
gimp:p

- name: Set pkg-config sysroot
run: echo "PKG_CONFIG_SYSROOT_DIR=${{ steps.msys2.outputs.msys2-location }}/clang64" >> $GITHUB_ENV

- name: Check PKG_CONFIG_SYSROOT_DIR
run: echo $PKG_CONFIG_SYSROOT_DIR

- name: Install x86_64-pc-windows-gnu
run: rustup target add x86_64-pc-windows-gnu

- uses: actions/checkout@v4
with:
submodules: recursive

- name: Configure CMake
shell: msys2 {0}
run: >
cmake
-DCMAKE_BUILD_TYPE:STRING=${{env.BUILD_TYPE}}
-DRust_CARGO_TARGET:STRING=x86_64-pc-windows-gnu
-S "${{ github.workspace }}"
-B "${{ github.workspace }}/build"

- name: Build
run: cmake --build "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}}

- name: Upload plugin
uses: actions/upload-artifact@v4
with:
name: arma-gimp-plugin.exe
path: "${{ github.workspace }}/build/arma-gimp-plugin.exe"
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_subdirectory(arma-file-formats-cxx)

find_package(PkgConfig REQUIRED)

pkg_check_modules(GIMP REQUIRED gimp-3.0 gimpui-3.0)
pkg_check_modules(GIMP REQUIRED gimp-3.0 gimpui-3.0 glib-2.0)

add_executable(arma-gimp-plugin main.cpp)

Expand All @@ -17,11 +17,14 @@ target_link_libraries(arma-gimp-plugin ${GIMP_LIBRARIES})

target_link_libraries(arma-gimp-plugin aff_cxx_rust)

target_include_directories(arma-gimp-plugin PRIVATE aff_cxx_rust)
if(WIN32)
target_link_libraries(arma-gimp-plugin Bcrypt.lib "-Wl,-subsystem,windows")
endif()

if(WIN32 AND (NOT "$ENV{appdata}" STREQUAL ""))
file(TO_CMAKE_PATH "$ENV{appdata}/GIMP/2.10/plug-ins/arma-gimp-plugin.exe" GIMP_PLUGIN_DIR)

if(WIN32)
if(NOT "$ENV{appdata}" STREQUAL "")
file(TO_CMAKE_PATH "$ENV{appdata}/GIMP/2.10/plug-ins/arma-gimp-plugin/arma-gimp-plugin.exe" GIMP_PLUGIN_DIR)
endif()
else()
file(TO_CMAKE_PATH "$ENV{HOME}/.config/GIMP/3.0/plug-ins/arma-gimp-plugin/arma-gimp-plugin" GIMP_PLUGIN_DIR)
endif()
Expand Down
Loading