Skip to content

Commit f166f5c

Browse files
committed
Merge branch 'github-actions'
2 parents f21cf94 + ab15c45 commit f166f5c

File tree

4 files changed

+107
-41
lines changed

4 files changed

+107
-41
lines changed

.appveyor.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-linux:
7+
name: Build on Linux
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Install dependencies
13+
run: |
14+
sudo apt-get update && \
15+
sudo apt-get install libpoppler-glib-dev poppler-utils libwxgtk3.0-gtk3-dev
16+
17+
- name: Bootstrap
18+
run: ./bootstrap
19+
20+
- name: Configure
21+
run: ./configure
22+
23+
- name: Build
24+
run: make
25+
26+
- name: Build source tarball
27+
run: make dist
28+
29+
- name: Upload source tarball
30+
uses: actions/upload-artifact@v3
31+
with:
32+
name: source-tarball
33+
path: diff-pdf-*.tar.gz
34+
35+
36+
build-windows:
37+
name: Build on Windows
38+
runs-on: windows-latest
39+
40+
defaults:
41+
run:
42+
shell: msys2 {0}
43+
44+
steps:
45+
- uses: actions/checkout@v3
46+
47+
- name: Setup MSYS2 environment
48+
uses: msys2/setup-msys2@v2
49+
with:
50+
msystem: MINGW32
51+
update: true
52+
install: mingw-w64-i686-gcc automake autoconf pkg-config make zip mingw-w64-i686-poppler mingw-w64-i686-wxWidgets
53+
54+
- name: Bootstrap
55+
run: ./bootstrap
56+
57+
- name: Configure
58+
run: ./configure
59+
60+
- name: Build
61+
run: make
62+
63+
- name: Build Windows archive
64+
run: make windows-dist
65+
66+
- uses: actions/upload-artifact@v3
67+
with:
68+
name: windows-binaries
69+
path: diff-pdf*.zip
70+
71+
72+
publish-release:
73+
name: Publish release
74+
if: startsWith(github.ref, 'refs/tags/v')
75+
runs-on: ubuntu-latest
76+
needs: [build-linux, build-windows]
77+
steps:
78+
- uses: actions/download-artifact@v3
79+
with:
80+
name: source-tarball
81+
82+
- uses: actions/download-artifact@v3
83+
with:
84+
name: windows-binaries
85+
86+
- uses: ncipollo/release-action@v1
87+
with:
88+
allowUpdates: true
89+
prerelease: true
90+
artifacts: "*.zip,*.tar.gz"
91+
token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ with finishing it. However, please do not expect any kind of support, including
55
implementation of feature requests or fixes. If you're not a developer and/or
66
willing to get your hands dirty, this tool is probably not for you.*
77

8-
[![Build status](https://ci.appveyor.com/api/projects/status/m6d8n2kcyvk3cqi6?svg=true)](https://ci.appveyor.com/project/vslavik/diff-pdf)
8+
[![Build](https://github.com/vslavik/diff-pdf/actions/workflows/build.yml/badge.svg)](https://github.com/vslavik/diff-pdf/actions/workflows/build.yml)
99

1010
## Usage
1111

win32/collect-dlls.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,30 @@ EXE=$2
1111
mkdir -p $OUTPUT
1212
rm -rf $OUTPUT/*
1313

14-
cp -a $EXE $OUTPUT
14+
add_binary()
15+
{
16+
destfile="$OUTPUT/`basename $1`"
17+
if [ ! -f $destfile ] ; then
18+
cp -anv $1 $destfile
19+
objdump -x $1 | grep "DLL Name" | cut -d: -f2 >${destfile}.objdeps
20+
fi
21+
}
22+
1523
last_file_count=0
24+
add_binary $EXE
1625

1726
while true ; do
18-
file_count=`ls -1 $OUTPUT/* | wc -l`
27+
file_count=`ls -1 $OUTPUT/*.objdeps | wc -l`
1928
echo "count=$file_count"
2029
if [ $file_count -eq $last_file_count ] ; then break ; fi
2130
last_file_count=$file_count
2231

23-
objdump -x $OUTPUT/* | grep "DLL Name" | cut -d: -f2 | sort | uniq | while read i ; do
32+
cat $OUTPUT/*.objdeps | sort | uniq | while read i ; do
2433
dll=`echo $i` # fixup weird line endings
2534
if [[ -f /mingw32/bin/$dll ]] ; then
26-
cp -anv /mingw32/bin/$dll $OUTPUT
35+
add_binary /mingw32/bin/$dll
2736
fi
2837
done
2938
done
39+
40+
rm -rf $OUTPUT/*.objdeps

0 commit comments

Comments
 (0)