Skip to content

Commit 77eae95

Browse files
committed
Add some github actions
These were copied from retro-prpl and the i18n stuff was removed.
1 parent 57fd789 commit 77eae95

6 files changed

Lines changed: 255 additions & 1 deletion

File tree

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "thursday"
9+
groups:
10+
actions:
11+
patterns:
12+
- "*"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: "CodeQL"
3+
4+
on:
5+
- push
6+
- pull_request
7+
8+
jobs:
9+
analyze:
10+
name: Analyze
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
security-events: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
with:
20+
persist-credentials: false
21+
22+
- name: Initialize CodeQL
23+
uses: github/codeql-action/init@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
24+
with:
25+
languages: c-cpp
26+
27+
- name: Build project
28+
run: |
29+
sudo apt-get update -yy
30+
sudo apt-get install -yy \
31+
build-essential \
32+
gettext \
33+
libjson-glib-dev \
34+
libpurple-dev \
35+
meson \
36+
zlib1g-dev
37+
meson setup build
38+
ninja -C build all
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/init@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5

.github/workflows/linux.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Test building on Linux
3+
4+
on:
5+
- push
6+
- pull_request
7+
8+
jobs:
9+
build:
10+
name: build
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
15+
steps:
16+
- name: Prepare build environment
17+
run: |
18+
sudo apt-get update -yy
19+
sudo apt-get install -yy --no-install-recommends \
20+
build-essential \
21+
gettext \
22+
libjson-glib-dev \
23+
libpurple-dev \
24+
meson \
25+
zlib1g-dev
26+
27+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28+
29+
- name: Setup Meson build
30+
run: meson setup build
31+
32+
- name: Build project
33+
run: ninja -C build all
34+
35+
- name: Install build results
36+
run: DESTDIR=$PWD/dist ninja -C build install
37+
38+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
39+
with:
40+
name: "Linux"
41+
path: ./dist

.github/workflows/macos.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Test building on macOS
3+
4+
on:
5+
- push
6+
- pull_request
7+
8+
jobs:
9+
build:
10+
name: build
11+
runs-on: macos-latest
12+
permissions:
13+
contents: read
14+
15+
steps:
16+
- name: Prepare build environment
17+
run: |
18+
brew update
19+
brew install codespell gettext json-glib meson pidgin zlib
20+
21+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
23+
- name: Setup Meson build
24+
run: meson setup build
25+
26+
- name: Build project
27+
run: ninja -C build all
28+
29+
- name: Install build results
30+
run: DESTDIR=$PWD/dist ninja -C build install
31+
32+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
33+
with:
34+
name: "macOS"
35+
path: ./dist

.github/workflows/win32-cross.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Cross compile for Windows
2+
on:
3+
- push
4+
- pull_request
5+
env:
6+
PIDGIN_VERSION: 2.14.14
7+
GLIB_VERSION: 2.28.8
8+
jobs:
9+
build:
10+
name: build
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
15+
steps:
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
18+
- name: Make cross directory
19+
run: mkdir -p $RUNNER_TEMP
20+
21+
- name: Write cross file
22+
run: |
23+
cat << EOF | tee $RUNNER_TEMP/cross-file.ini
24+
[binaries]
25+
c = '/usr/bin/i686-w64-mingw32-gcc'
26+
ar = '/usr/bin/i686-w64-mingw32-gcc-ar'
27+
strip = '/usr/bin/i686-w64-mingw32-strip'
28+
pkg-config = ['/usr/bin/pkg-config', '--define-prefix']
29+
windres = '/usr/bin/i686-w64-mingw32-windres'
30+
31+
[host_machine]
32+
system = 'windows'
33+
cpu_family = 'x86'
34+
cpu = 'i686'
35+
endian = 'little'
36+
37+
[properties]
38+
sys_root = '$RUNNER_TEMP'
39+
pidgin_top = sys_root / 'pidgin'
40+
win32_dev = sys_root / 'win32-dev'
41+
pkg_config_libdir = [win32_dev / 'lib/pkgconfig', pidgin_top / 'libpurple/data/']
42+
c_args = ['-I' + win32_dev / 'include']
43+
c_link_args = ['-L' + win32_dev / 'lib']
44+
EOF
45+
46+
- name: Install native packages
47+
run: |
48+
sudo apt update -yy
49+
sudo apt install -yy --no-install-recommends \
50+
codespell \
51+
gcc-mingw-w64-i686-win32 \
52+
meson \
53+
pkg-config
54+
55+
- name: Load Pidgin from cache
56+
id: pidgin-cache
57+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
58+
with:
59+
path: ${{ runner.temp }}/pidgin
60+
key: pidgin-${{ env.PIDGIN_VERSION }}
61+
62+
- name: Download Pidgin
63+
if: steps.pidgin-cache.outputs.cache-hit != 'true'
64+
run: |
65+
curl -L https://sourceforge.net/projects/pidgin/files/Pidgin/$PIDGIN_VERSION/pidgin-$PIDGIN_VERSION.tar.bz2/download -o pidgin.tar.bz2
66+
mkdir -p $RUNNER_TEMP/pidgin
67+
tar -xf pidgin.tar.bz2 --strip-components=1 --directory=$RUNNER_TEMP/pidgin
68+
curl -L https://sourceforge.net/projects/pidgin/files/Pidgin/$PIDGIN_VERSION/pidgin-$PIDGIN_VERSION-win32-bin.zip/download -o pidgin-win32bin.zip
69+
unzip -j pidgin-win32bin.zip pidgin-*-win32bin/libpurple.dll -d $RUNNER_TEMP/pidgin/libpurple/
70+
71+
- name: Create purple.pc
72+
run : |
73+
cat << 'EOF' | tee $RUNNER_TEMP/pidgin/libpurple/data/purple.pc
74+
prefix=${{ runner.temp }}/pidgin/libpurple
75+
exec_prefix=${prefix}
76+
libdir=${exec_prefix}
77+
includedir=${prefix}
78+
datarootdir=${prefix}/share
79+
datadir=${datarootdir}
80+
sysconfdir=${prefix}/etc
81+
82+
plugindir=${libdir}/purple-2
83+
84+
Name: libpurple
85+
Description: libpurple is a GLib-based instant messenger library.
86+
Version: ${{ env.PIDGIN_VERSION }}
87+
Requires: glib-2.0
88+
Cflags: -I${prefix} -I${prefix}/win32
89+
Libs: -L${libdir} -lpurple
90+
EOF
91+
92+
- name: Load Win32 deps from cache
93+
id: win32-cache
94+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
95+
with:
96+
path: ${{ runner.temp }}/win32-dev
97+
key: win32-dev
98+
99+
- name: Setup WinPidgin build
100+
if: steps.win32-cache.outputs.cache-hit != 'true'
101+
run: |
102+
curl -L http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib-dev_2.28.8-1_win32.zip -o glib-dev.zip
103+
unzip glib-dev.zip -d $RUNNER_TEMP/win32-dev
104+
curl -L http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-dev_0.18.1.1-2_win32.zip -o gettext-runtime.zip
105+
unzip gettext-runtime.zip -d $RUNNER_TEMP/win32-dev
106+
curl -L http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-dev_1.2.5-2_win32.zip -o zlib-dev.zip
107+
unzip zlib-dev.zip -d $RUNNER_TEMP/win32-dev
108+
109+
- name: Setup Meson Build
110+
run: meson setup --cross-file $RUNNER_TEMP/cross-file.ini --prefix=/usr -Duse-purple-prefix=false build
111+
112+
- name: Build Project
113+
run: meson compile -C build
114+
115+
- name: Install build results
116+
run: DESTDIR=$PWD/dist meson install -C build
117+
118+
- name: archive
119+
if: ${{ !env.ACT }}
120+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
121+
with:
122+
name: "Win32 cross compiled"
123+
path: |
124+
./dist/
125+
!./dist/**/*.dll.a

facebook/util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
#include <glib.h>
3535

36-
#include <libpurple/util.h>
36+
#include <util.h>
3737

3838
#include "account.h"
3939
#include "debug.h"

0 commit comments

Comments
 (0)