Skip to content

Commit e0e6df7

Browse files
Add workflows for macOS 10.15 and 11.0
* Pass --no-ldconfig to macOS workflow scripts * Add C**FLAGS for macos * Adjust PREFIX for no_ldconfig example for macOS CI
1 parent 9ea67c6 commit e0e6df7

File tree

9 files changed

+371
-2
lines changed

9 files changed

+371
-2
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: macOS 10.15 (head)
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- 'release/**'
9+
10+
jobs:
11+
tests:
12+
runs-on: macos-10.15
13+
if: "!contains(github.event.head_commit.message, 'skip ci')"
14+
strategy:
15+
matrix:
16+
env:
17+
- SCRIPT: all_head
18+
19+
env: ${{ matrix.env }}
20+
timeout-minutes: 70
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
- name: Set up build environment
26+
run: |
27+
cat > Brewfile <<BREWFILE
28+
29+
brew "make"
30+
brew "autoconf"
31+
brew "automake"
32+
brew "libtool"
33+
brew "pkg-config"
34+
brew "gnupg"
35+
brew "bison"
36+
BREWFILE
37+
38+
brew update-reset
39+
# homebrew fails because `openssl` is a symlink while it tries to remove a directory.
40+
rm /usr/local/Cellar/openssl || true
41+
# homebrew fails to update python 3.9.1 to 3.9.1.1 due to unlinking failure
42+
rm /usr/local/bin/2to3 || true
43+
44+
brew bundle
45+
- name: Build GPG
46+
# Workaround to correctly build pinentry on the latest GHA on
47+
# macOS. Most likely there is a better solution.
48+
env:
49+
CFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
50+
CXXFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
51+
run: |
52+
bash -x "./examples/${SCRIPT}.sh" --no-ldconfig
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: macOS 10.15 (latest)
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- 'release/**'
9+
10+
jobs:
11+
tests:
12+
runs-on: macos-10.15
13+
if: "!contains(github.event.head_commit.message, 'skip ci')"
14+
strategy:
15+
matrix:
16+
env:
17+
- SCRIPT: all_latest
18+
19+
env: ${{ matrix.env }}
20+
timeout-minutes: 70
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
- name: Set up build environment
26+
run: |
27+
cat > Brewfile <<BREWFILE
28+
29+
brew "make"
30+
brew "autoconf"
31+
brew "automake"
32+
brew "libtool"
33+
brew "pkg-config"
34+
brew "gnupg"
35+
brew "bison"
36+
BREWFILE
37+
38+
brew update-reset
39+
# homebrew fails because `openssl` is a symlink while it tries to remove a directory.
40+
rm /usr/local/Cellar/openssl || true
41+
# homebrew fails to update python 3.9.1 to 3.9.1.1 due to unlinking failure
42+
rm /usr/local/bin/2to3 || true
43+
44+
brew bundle
45+
- name: Build GPG
46+
# Workaround to correctly build pinentry on the latest GHA on
47+
# macOS. Most likely there is a better solution.
48+
env:
49+
CFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
50+
CXXFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
51+
run: |
52+
bash -x "./examples/${SCRIPT}.sh" --no-ldconfig

.github/workflows/macos-10.15.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: macOS 10.15
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- 'release/**'
9+
10+
jobs:
11+
tests:
12+
runs-on: macos-10.15
13+
if: "!contains(github.event.head_commit.message, 'skip ci')"
14+
strategy:
15+
matrix:
16+
env:
17+
- SCRIPT: all_2.1
18+
- SCRIPT: all_2.2
19+
- SCRIPT: build_dir
20+
- SCRIPT: components_individually
21+
- SCRIPT: configure_options
22+
- SCRIPT: gpgme
23+
- SCRIPT: install_prefix
24+
- SCRIPT: no_ldconfig
25+
- SCRIPT: no_sudo
26+
- SCRIPT: verify
27+
28+
exclude:
29+
- env:
30+
SCRIPT: all_2.1 # libksba too old for macOS
31+
- env:
32+
SCRIPT: no_sudo
33+
34+
env: ${{ matrix.env }}
35+
timeout-minutes: 70
36+
continue-on-error: true
37+
steps:
38+
- uses: actions/checkout@v2
39+
with:
40+
fetch-depth: 0
41+
- name: Set up build environment
42+
run: |
43+
cat > Brewfile <<BREWFILE
44+
45+
brew "make"
46+
brew "autoconf"
47+
brew "automake"
48+
brew "libtool"
49+
brew "pkg-config"
50+
brew "gnupg"
51+
brew "bison"
52+
BREWFILE
53+
54+
brew update-reset
55+
# homebrew fails because `openssl` is a symlink while it tries to remove a directory.
56+
rm /usr/local/Cellar/openssl || true
57+
# homebrew fails to update python 3.9.1 to 3.9.1.1 due to unlinking failure
58+
rm /usr/local/bin/2to3 || true
59+
60+
brew bundle
61+
- name: Import GnuPG keys for "verify.sh" example
62+
if: ${{ matrix.env.SCRIPT == 'verify' }}
63+
run: |
64+
bash ci/import_gpg_keys.sh
65+
- name: Build GPG
66+
# Workaround to correctly build pinentry on the latest GHA on
67+
# macOS. Most likely there is a better solution.
68+
env:
69+
CFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
70+
CXXFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
71+
run: |
72+
bash -x "./examples/${SCRIPT}.sh" --no-ldconfig
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: macOS 11.0 (head)
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- 'release/**'
9+
10+
jobs:
11+
tests:
12+
runs-on: macos-11.0
13+
if: "!contains(github.event.head_commit.message, 'skip ci')"
14+
strategy:
15+
matrix:
16+
env:
17+
- SCRIPT: all_head
18+
19+
env: ${{ matrix.env }}
20+
timeout-minutes: 70
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
- name: Set up build environment
26+
run: |
27+
cat > Brewfile <<BREWFILE
28+
29+
brew "make"
30+
brew "autoconf"
31+
brew "automake"
32+
brew "libtool"
33+
brew "pkg-config"
34+
brew "gnupg"
35+
brew "bison"
36+
BREWFILE
37+
38+
brew update-reset
39+
# homebrew fails because `openssl` is a symlink while it tries to remove a directory.
40+
rm /usr/local/Cellar/openssl || true
41+
# homebrew fails to update python 3.9.1 to 3.9.1.1 due to unlinking failure
42+
rm /usr/local/bin/2to3 || true
43+
44+
brew bundle
45+
- name: Build GPG
46+
# Workaround to correctly build pinentry on the latest GHA on
47+
# macOS. Most likely there is a better solution.
48+
env:
49+
CFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
50+
CXXFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
51+
run: |
52+
bash -x "./examples/${SCRIPT}.sh" --no-ldconfig
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: macOS 11.0 (latest)
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- 'release/**'
9+
10+
jobs:
11+
tests:
12+
runs-on: macos-11.0
13+
if: "!contains(github.event.head_commit.message, 'skip ci')"
14+
strategy:
15+
matrix:
16+
env:
17+
- SCRIPT: all_latest
18+
19+
env: ${{ matrix.env }}
20+
timeout-minutes: 70
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
- name: Set up build environment
26+
run: |
27+
cat > Brewfile <<BREWFILE
28+
29+
brew "make"
30+
brew "autoconf"
31+
brew "automake"
32+
brew "libtool"
33+
brew "pkg-config"
34+
brew "gnupg"
35+
brew "bison"
36+
BREWFILE
37+
38+
brew update-reset
39+
# homebrew fails because `openssl` is a symlink while it tries to remove a directory.
40+
rm /usr/local/Cellar/openssl || true
41+
# homebrew fails to update python 3.9.1 to 3.9.1.1 due to unlinking failure
42+
rm /usr/local/bin/2to3 || true
43+
44+
brew bundle
45+
- name: Build GPG
46+
# Workaround to correctly build pinentry on the latest GHA on
47+
# macOS. Most likely there is a better solution.
48+
env:
49+
CFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
50+
CXXFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
51+
run: |
52+
bash -x "./examples/${SCRIPT}.sh" --no-ldconfig

.github/workflows/macos-11.0.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: macOS 11.0
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- 'release/**'
9+
10+
jobs:
11+
tests:
12+
runs-on: macos-11.0
13+
if: "!contains(github.event.head_commit.message, 'skip ci')"
14+
strategy:
15+
matrix:
16+
env:
17+
- SCRIPT: all_2.1
18+
- SCRIPT: all_2.2
19+
- SCRIPT: build_dir
20+
- SCRIPT: components_individually
21+
- SCRIPT: configure_options
22+
- SCRIPT: gpgme
23+
- SCRIPT: install_prefix
24+
- SCRIPT: no_ldconfig
25+
- SCRIPT: no_sudo
26+
- SCRIPT: verify
27+
28+
exclude:
29+
- env:
30+
SCRIPT: all_2.1 # libksba too old for macOS
31+
- env:
32+
SCRIPT: no_sudo
33+
34+
env: ${{ matrix.env }}
35+
timeout-minutes: 70
36+
continue-on-error: true
37+
steps:
38+
- uses: actions/checkout@v2
39+
with:
40+
fetch-depth: 0
41+
- name: Set up build environment
42+
run: |
43+
cat > Brewfile <<BREWFILE
44+
45+
brew "make"
46+
brew "autoconf"
47+
brew "automake"
48+
brew "libtool"
49+
brew "pkg-config"
50+
brew "gnupg"
51+
brew "bison"
52+
BREWFILE
53+
54+
brew update-reset
55+
# homebrew fails because `openssl` is a symlink while it tries to remove a directory.
56+
rm /usr/local/Cellar/openssl || true
57+
# homebrew fails to update python 3.9.1 to 3.9.1.1 due to unlinking failure
58+
rm /usr/local/bin/2to3 || true
59+
60+
brew bundle
61+
- name: Import GnuPG keys for "verify.sh" example
62+
if: ${{ matrix.env.SCRIPT == 'verify' }}
63+
run: |
64+
bash ci/import_gpg_keys.sh
65+
- name: Build GPG
66+
# Workaround to correctly build pinentry on the latest GHA on
67+
# macOS. Most likely there is a better solution.
68+
env:
69+
CFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
70+
CXXFLAGS: "-D_XOPEN_SOURCE_EXTENDED"
71+
run: |
72+
bash -x "./examples/${SCRIPT}.sh" --no-ldconfig

README.adoc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A set of build scripts for GNU Privacy Guard.
44

55
[options="header"]
66
|==========================
7-
|distro | |latest |head
7+
|OS \ GPG version |2.1, 2.2 |latest |head
88

99
|Fedora 33
1010
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/fedora-33.yml/badge.svg["Fedora 33", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/fedora-33.yml"]
@@ -40,6 +40,16 @@ A set of build scripts for GNU Privacy Guard.
4040
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04.yml/badge.svg["Ubuntu 14.04", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04.yml"]
4141
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04-latest.yml/badge.svg["Ubuntu 14.04 (latest)", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04-latest.yml"]
4242
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04-head.yml/badge.svg["Ubuntu 14.04 (head)", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/ubuntu-14.04-head.yml"] footnote:[Version of gettext is too old in Ubuntu 14.04.]
43+
44+
|macOS 11.0
45+
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0.yml/badge.svg["macOS 11.0", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0.yml"]
46+
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0-latest.yml/badge.svg["macOS 11.0 (latest)", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0-latest.yml"]
47+
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0-head.yml/badge.svg["macOS 11.0 (head)", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-11.0-head.yml"]
48+
49+
|macOS 10.15
50+
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15.yml/badge.svg["macOS 10.15", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15.yml"]
51+
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15-latest.yml/badge.svg["macOS 10.15 (latest)", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15-latest.yml"]
52+
|image:https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15-head.yml/badge.svg["macOS 10.15 (head)", link="https://github.com/rnpgp/gpg-build-scripts/actions/workflows/macos-10.15-head.yml"]
4353
|==========================
4454

4555

examples/gpgme.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ gpgme-config --version | head -n 1 | cut -d" " -f 3 | grep -xE "1\.[0-9]+\.[0-9]
3636
[[ $(gpgme-config --prefix) == "/usr/local" ]]
3737

3838
# Assert the presence of dynamic library…
39-
[[ -f /usr/local/lib/libgpgme.so ]]
39+
# shellcheck disable=SC2010
40+
ls /usr/local/lib/libgpgme.{so,dylib} 2>/dev/null | grep -q .

0 commit comments

Comments
 (0)