Skip to content

Commit f2aec06

Browse files
committed
Updated build scripts
1 parent 560e3ec commit f2aec06

15 files changed

+417
-45
lines changed

.github/workflows/linux.yml

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Linux
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- beta
8+
- stable
9+
pull_request:
10+
branches:
11+
- master
12+
- beta
13+
- stable
14+
15+
jobs:
16+
Linux_x86-64:
17+
runs-on: ubuntu-18.04
18+
19+
env:
20+
UPLOAD_ENABLED: ${{ secrets.DROPBOX_ACCESS_TOKEN }}
21+
22+
steps:
23+
- name: Update package repositories
24+
run: >-
25+
sudo apt update
26+
27+
- name: Install deb packages
28+
run: >-
29+
sudo apt install
30+
dos2unix
31+
gettext
32+
intltool
33+
libao-dev
34+
libasound2-dev
35+
libevdev-dev
36+
libgbm-dev
37+
libgl-dev
38+
libglu-dev
39+
libopenal-dev
40+
libpulse-dev
41+
libudev-dev
42+
libusb-1.0-0-dev
43+
libx11-dev
44+
libx11-xcb-dev
45+
libxcb1-dev
46+
libxcb-glx0-dev
47+
libxcb-icccm4-dev
48+
libxcb-image0-dev
49+
libxcb-keysyms1-dev
50+
libxcb-randr0-dev
51+
libxcb-render-util0-dev
52+
libxcb-shape0-dev
53+
libxcb-shm0-dev
54+
libxcb-sync0-dev
55+
libxcb-xfixes0-dev
56+
libxcb-xinerama0-dev
57+
libxcursor-dev
58+
libxext-dev
59+
libxfixes-dev
60+
libxi-dev
61+
libxinerama-dev
62+
libxrandr-dev
63+
libxrender-dev
64+
x11proto-dev
65+
66+
- name: Install pip packages
67+
run: |
68+
sudo python3 -m pip install -U pip setuptools
69+
sudo python3 -m pip install -U meson ninja
70+
71+
- uses: actions/checkout@v2
72+
with:
73+
fetch-depth: 0
74+
75+
- name: Cache dependencies
76+
uses: actions/cache@v2
77+
id: fsdeps_cache
78+
with:
79+
path: fsdeps/_prefix
80+
key: fsdeps_${{ hashFiles('fsdeps/**/*') }}_${{ runner.os }}
81+
82+
- name: Build dependencies
83+
if: steps.fsdeps_cache.outputs.cache-hit != 'true'
84+
run: fsdeps/make
85+
86+
- name: Update version
87+
run: fsbuild/version --update --auto
88+
89+
- name: Bootstrap
90+
run: fsdeps/use fsbuild/bootstrap
91+
92+
- name: Configure
93+
run: fsdeps/use fsbuild/configure
94+
95+
- name: Make
96+
run: fsdeps/use fsbuild/make
97+
98+
- name: Bundle
99+
run: fsdeps/use fsbuild/bundle
100+
101+
- name: Archive
102+
run: fsbuild/archive
103+
104+
- uses: actions/upload-artifact@v2
105+
with:
106+
name: Linux_x86-64
107+
path: fsbuild/_dist/*
108+
109+
- name: Upload build to Dropbox folder
110+
if: >-
111+
env.UPLOAD_ENABLED != null && (
112+
github.ref == 'refs/heads/master' ||
113+
github.ref == 'refs/heads/dev' ||
114+
github.ref == 'refs/heads/stable'
115+
)
116+
run: |
117+
python3 -m pip install dropbox
118+
fsbuild/upload
119+
env:
120+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
121+
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }}

.github/workflows/macos.yml

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: macOS
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- beta
8+
- stable
9+
pull_request:
10+
branches:
11+
- master
12+
- beta
13+
- stable
14+
15+
jobs:
16+
macOS_x86-64:
17+
runs-on: macos-10.15
18+
19+
env:
20+
SIGNING_ENABLED: ${{ secrets.MACOS_CERTIFICATE_P12_DATA }}
21+
UPLOAD_ENABLED: ${{ secrets.DROPBOX_ACCESS_TOKEN }}
22+
23+
steps:
24+
- name: Install brew packages
25+
run: brew install autoconf automake dos2unix meson
26+
27+
- uses: actions/checkout@v2
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Cache dependencies
32+
uses: actions/cache@v2
33+
id: fsdeps_cache
34+
with:
35+
path: fsdeps/_prefix
36+
key: fsdeps_${{ hashFiles('fsdeps/**/*') }}_${{ runner.os }}
37+
38+
- name: Build dependencies
39+
if: steps.fsdeps_cache.outputs.cache-hit != 'true'
40+
run: fsdeps/make
41+
42+
- name: Update version
43+
run: fsbuild/version --update --auto
44+
45+
- name: Bootstrap
46+
run: fsdeps/use fsbuild/bootstrap
47+
48+
- name: Configure
49+
run: fsdeps/use fsbuild/configure
50+
51+
- name: Make
52+
run: fsdeps/use fsbuild/make
53+
54+
- name: Bundle
55+
run: fsbuild/bundle
56+
57+
- name: Prepare signing certificate
58+
if: env.SIGNING_ENABLED != null
59+
run: |
60+
echo $SIGNING_CERTIFICATE_P12_DATA | base64 --decode > certificate.p12
61+
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
62+
security default-keychain -s build.keychain
63+
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
64+
security import certificate.p12 -k build.keychain -P $SIGNING_CERTIFICATE_PASSWORD -T /usr/bin/codesign
65+
security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASSWORD build.keychain
66+
env:
67+
KEYCHAIN_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
68+
SIGNING_CERTIFICATE_P12_DATA: ${{ secrets.MACOS_CERTIFICATE_P12_DATA }}
69+
SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
70+
71+
- name: Sign
72+
if: env.SIGNING_ENABLED != null
73+
run: fsbuild/sign
74+
75+
- name: Notarize
76+
if: env.SIGNING_ENABLED != null
77+
run: fsbuild/notarize
78+
env:
79+
NOTARIZATION_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
80+
NOTARIZATION_PROVIDER: ${{ secrets.MACOS_NOTARIZATION_PROVIDER }}
81+
NOTARIZATION_USERNAME: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
82+
83+
- name: Archive
84+
run: fsbuild/archive
85+
86+
- uses: actions/upload-artifact@v2
87+
with:
88+
name: macOS_x86-64
89+
path: fsbuild/_dist/*
90+
91+
- name: Upload build to Dropbox folder
92+
if: >-
93+
env.UPLOAD_ENABLED != null && (
94+
github.ref == 'refs/heads/master' ||
95+
github.ref == 'refs/heads/dev' ||
96+
github.ref == 'refs/heads/stable'
97+
)
98+
run: |
99+
python3 -m pip install dropbox
100+
fsbuild/upload
101+
env:
102+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
103+
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }}

.github/workflows/windows.yml

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: Windows
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- beta
8+
- stable
9+
pull_request:
10+
branches:
11+
- master
12+
- beta
13+
- stable
14+
15+
jobs:
16+
Windows_x86-64:
17+
runs-on: windows-2016
18+
19+
env:
20+
UPLOAD_ENABLED: ${{ secrets.DROPBOX_ACCESS_TOKEN }}
21+
22+
defaults:
23+
run:
24+
shell: msys2 {0}
25+
26+
steps:
27+
- uses: msys2/setup-msys2@v2
28+
with:
29+
update: true
30+
install: >-
31+
autoconf
32+
automake
33+
base-devel
34+
gettext
35+
git
36+
libtool
37+
make
38+
mingw-w64-x86_64-cmake
39+
mingw-w64-x86_64-gcc
40+
mingw-w64-x86_64-ducible
41+
mingw-w64-x86_64-icoutils
42+
mingw-w64-x86_64-meson
43+
mingw-w64-x86_64-openal
44+
mingw-w64-x86_64-pkg-config
45+
mingw-w64-x86_64-python
46+
mingw-w64-x86_64-python-pip
47+
mingw-w64-x86_64-python2
48+
tar
49+
unzip
50+
zip
51+
52+
- uses: actions/checkout@v2
53+
with:
54+
fetch-depth: 0
55+
56+
- name: Cache dependencies
57+
uses: actions/cache@v2
58+
id: fsdeps_cache
59+
with:
60+
path: fsdeps/_prefix
61+
key: fsdeps_${{ hashFiles('fsdeps/**/*') }}_${{ runner.os }}
62+
63+
- name: Build dependencies
64+
if: steps.fsdeps_cache.outputs.cache-hit != 'true'
65+
run: fsdeps/make
66+
67+
- name: Update version
68+
run: fsbuild/version --update --auto
69+
70+
- name: Bootstrap
71+
run: fsdeps/use fsbuild/bootstrap
72+
73+
- name: Configure
74+
run: fsdeps/use fsbuild/configure
75+
76+
- name: Make
77+
run: fsdeps/use fsbuild/make
78+
79+
- name: Bundle
80+
run: fsbuild/bundle
81+
82+
- name: Archive
83+
run: fsbuild/archive
84+
85+
- uses: actions/upload-artifact@v2
86+
with:
87+
name: Windows_x86-64
88+
path: fsbuild/_dist/*
89+
90+
- name: Upload build to Dropbox folder
91+
if: >-
92+
env.UPLOAD_ENABLED != null && (
93+
github.ref == 'refs/heads/master' ||
94+
github.ref == 'refs/heads/dev' ||
95+
github.ref == 'refs/heads/stable'
96+
)
97+
run: |
98+
python3 -m pip install dropbox
99+
fsbuild/upload
100+
env:
101+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
102+
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }}

BASEVERSION.FS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.1.1

PACKAGE.FS

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ PACKAGE_MACOS_BUNDLE_ID=dev.solheim.capsimg
33
PACKAGE_NAME=capsimg
44
PACKAGE_NAME_PRETTY=CAPSImg
55
PACKAGE_TYPE=fs-library-plugin
6-
PACKAGE_VERSION=5.1.0.4-fs
7-
PACKAGE_VERSION_MAJOR=5
8-
PACKAGE_VERSION_MINOR=1
6+
PACKAGE_VERSION=0.0.0
7+
PACKAGE_VERSION_MAJOR=0
8+
PACKAGE_VERSION_MINOR=0
99
PACKAGE_VERSION_REVISION=0
10-
PACKAGE_VERSION_TAG=-fs
10+
PACKAGE_VERSION_TAG=

fsbuild/bootstrap

+8
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33

44
set -e
55

6+
if [ -f fsbuild/bootstrap.pre.sh ]; then
7+
. fsbuild/bootstrap.pre.sh
8+
fi
9+
610
if [ -f fsbuild/bootstrap.sh ]; then
711
. fsbuild/bootstrap.sh
812
elif [ -f fsplugin/Makefile ]; then
913
make -C fsplugin bootstrap
1014
elif [ -f ./bootstrap ]; then
1115
./bootstrap
1216
fi
17+
18+
if [ -f fsbuild/bootstrap.post.sh ]; then
19+
. fsbuild/bootstrap.post.sh
20+
fi

fsbuild/clean

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
set -e
55

6-
rm -Rf fsbuild/_*
6+
rm -Rf fsbuild/_[a-z]*
77

88
if [ -f fsbuild/clean.sh ]; then
99
. fsbuild/clean.sh

fsbuild/notarize

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def main():
4545
elif isMacOS():
4646
notarizeForMacOS()
4747
else:
48-
print("Skipping sign step (No signatures for this platform")
48+
print("Skipping sign step (no signatures for this platform)")
4949

5050

5151
if __name__ == "__main__":

fsbuild/sign

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def main():
2727
args.append(getBundlePath())
2828
runCodeSign(args)
2929
else:
30-
print("Skipping sign step (No signatures for this platform")
30+
print("Skipping sign step (no signatures for this platform)")
3131

3232

3333
if __name__ == "__main__":

0 commit comments

Comments
 (0)