Skip to content

Commit 7699ddf

Browse files
committed
Try to add github actions CI
1 parent 30ce7d4 commit 7699ddf

34 files changed

+787
-0
lines changed

.github/workflows/linux.yaml

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
name: Linux distro build
2+
3+
on: push
4+
5+
jobs:
6+
buster:
7+
name: Debian Buster
8+
runs-on: ubuntu-latest
9+
container:
10+
image: debian:buster
11+
12+
steps:
13+
- name: Install git
14+
run: |
15+
apt-get update -qq
16+
apt-get install -qq --force-yes git
17+
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
with:
21+
submodules: 'recursive'
22+
23+
- name: Dependencies
24+
run: |
25+
./ci/buster.deps.sh
26+
27+
- name: Build
28+
run: |
29+
./ci/buster.build.sh
30+
31+
bullseye:
32+
name: Debian Bullseye
33+
runs-on: ubuntu-latest
34+
container:
35+
image: debian:bullseye
36+
37+
steps:
38+
- name: Install git
39+
run: |
40+
apt-get update -qq
41+
apt-get install -qq --force-yes git
42+
43+
- name: Checkout code
44+
uses: actions/checkout@v2
45+
with:
46+
submodules: 'recursive'
47+
48+
- name: Dependencies
49+
run: |
50+
./ci/bullseye.deps.sh
51+
52+
- name: Build
53+
run: |
54+
./ci/bullseye.build.sh
55+
56+
fedora:
57+
name: Fedora 33
58+
runs-on: ubuntu-latest
59+
container:
60+
image: fedora:33
61+
62+
steps:
63+
- name: Install git
64+
run: |
65+
dnf -y install git
66+
67+
- name: Checkout code
68+
uses: actions/checkout@v2
69+
with:
70+
submodules: 'recursive'
71+
72+
- name: Dependencies
73+
run: |
74+
./ci/fedora.deps.sh
75+
76+
- name: Build
77+
run: |
78+
./ci/fedora.build.sh
79+
80+
suseleap:
81+
name: OpenSUSE Leap
82+
runs-on: ubuntu-latest
83+
container:
84+
image: opensuse/leap:latest
85+
86+
steps:
87+
- name: Install git
88+
run: |
89+
zypper -n install git
90+
91+
- name: Checkout code
92+
uses: actions/checkout@v2
93+
with:
94+
submodules: 'recursive'
95+
96+
- name: Dependencies
97+
run: |
98+
./ci/suse.deps.sh
99+
100+
- name: Build
101+
run: |
102+
./ci/suse.build.sh
103+
104+
susetumbleweed:
105+
name: OpenSUSE Tumbleweed
106+
runs-on: ubuntu-latest
107+
container:
108+
image: opensuse/tumbleweed:latest
109+
110+
steps:
111+
- name: Install git
112+
run: |
113+
zypper -n install git
114+
115+
- name: Checkout code
116+
uses: actions/checkout@v2
117+
with:
118+
submodules: 'recursive'
119+
120+
- name: Dependencies
121+
run: |
122+
./ci/suse.deps.sh
123+
124+
- name: Build
125+
run: |
126+
./ci/suse.build.sh
127+
128+
arch:
129+
name: ArchLinux
130+
runs-on: ubuntu-latest
131+
container:
132+
image: archlinux:latest
133+
134+
steps:
135+
- name: Install git
136+
run: |
137+
pacman -Syy --noconfirm
138+
pacman -S git --noconfirm
139+
140+
- name: Checkout code
141+
uses: actions/checkout@v2
142+
with:
143+
submodules: 'recursive'
144+
145+
- name: Dependencies
146+
run: |
147+
./ci/archlinux.deps.sh
148+
149+
- name: Build
150+
run: |
151+
./ci/archlinux.build.sh

.github/workflows/mac.yaml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: ${{ matrix.config.name }}
8+
runs-on: ${{ matrix.config.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
config:
13+
- {
14+
name: "MacOS Debug Homebrew",
15+
os: macos-latest,
16+
script: "osx-brew",
17+
buildtype: "Debug"
18+
}
19+
- {
20+
name: "MacOS Release Homebrew",
21+
os: macos-latest,
22+
script: "osx-brew",
23+
buildtype: "Release"
24+
}
25+
- {
26+
name: "MacOS Debug Package",
27+
os: macos-latest,
28+
script: "osx-package",
29+
buildtype: "Debug"
30+
}
31+
- {
32+
name: "MacOS Release Package",
33+
os: macos-latest,
34+
script: "osx-package",
35+
buildtype: "Release"
36+
}
37+
38+
steps:
39+
- uses: actions/checkout@v2
40+
41+
- name: Get latest release version number
42+
id: get_version
43+
uses: battila7/get-version-action@v2
44+
45+
- name: Dependencies
46+
run: |
47+
./ci/${{ matrix.config.script }}.deps.sh
48+
49+
- name: Build
50+
run: |
51+
export CMAKE_CONFIG=${{ matrix.config.buildtype }}
52+
./ci/${{ matrix.config.script }}.build.sh
53+

.github/workflows/windows.yaml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
name: ${{ matrix.config.name }}
8+
runs-on: ${{ matrix.config.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
config:
13+
- {
14+
name: "Windows",
15+
os: windows-latest
16+
buildtype: "Debug"
17+
}
18+
- {
19+
name: "Windows",
20+
os: windows-latest
21+
buildtype: "Release"
22+
}
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Get latest release version number
28+
id: get_version
29+
uses: battila7/get-version-action@v2
30+
31+
- name: Install dependencies
32+
run: |
33+
git submodule update --init --recursive
34+
shell: bash
35+
36+
- name: Configure
37+
run: |
38+
mkdir build && cd build
39+
cmake -G"Visual Studio 16 2019" -DBOOST_ROOT="$BOOST_ROOT_1_72_0" -DSEGMENT_RELEASE=1 ..
40+
shell: bash
41+
42+
- name: Build
43+
run: |
44+
cd build
45+
cmake --build . --config ${{ matrix.config.buildtype }}
46+
cmake --build . --config ${{ matrix.config.buildtype }} --target install
47+
48+

ci/appimage.build.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
export BUILD_FOLDER=/tmp/build
3+
export SOURCE_FOLDER=$PWD
4+
5+
mkdir -p $BUILD_FOLDER
6+
ln -s $BUILD_FOLDER build
7+
docker pull ossia/score-package-linux
8+
docker run \
9+
-v "$(pwd)"/CMake/Deployment/Linux/AppImage/Recipe:/Recipe \
10+
--mount type=bind,source="$(pwd)",target=/score \
11+
--mount type=bind,source="$BUILD_FOLDER",target=/build \
12+
ossia/score-package-linux \
13+
/bin/bash /Recipe
14+
15+
sudo chown -R $(whoami) $BUILD_FOLDER
16+
17+
wget "https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
18+
chmod a+x appimagetool-x86_64.AppImage
19+
20+
wget "https://github.com/probonopd/AppImageKit/releases/download/continuous/AppRun-x86_64"
21+
chmod a+x AppRun-x86_64
22+
cp AppRun-x86_64 build/score.AppDir/AppRun
23+
24+
./appimagetool-x86_64.AppImage -n "build/score.AppDir" "Score.AppImage"
25+
26+
chmod a+rwx Score.AppImage
27+
(
28+
cd $BUILD_FOLDER/SDK
29+
zip -r -q -9 $SOURCE_FOLDER/linux-sdk.zip usr
30+
)

ci/appimage.deploy.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash -eux
2+
export TAG=$GITTAGNOV
3+
4+
mv "Score.AppImage" "$BUILD_ARTIFACTSTAGINGDIRECTORY/SEGMent-$TAG-linux-amd64.AppImage"

ci/appimage.deps.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash -eux
2+
3+
sudo apt-get update -qq
4+
sudo apt-get install wget

ci/archlinux.build.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
export SCORE_DIR=$PWD
4+
5+
mkdir -p /build || true
6+
cd /build
7+
8+
cmake $SCORE_DIR \
9+
-GNinja \
10+
-DSEGMENT_RELEASE=1 \
11+
-DCMAKE_INSTALL_PREFIX=install
12+
13+
cmake --build .
14+
cmake --build . --target install

ci/archlinux.deps.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash -eux
2+
3+
pacman -S --noconfirm \
4+
cmake ninja gcc llvm clang boost \
5+
qt5-base qt5-imageformats qt5-websockets qt5-serialport qt5-declarative qt5-tools icu \
6+
ffmpeg portaudio jack2 lv2 suil lilv sdl2 alsa-lib \
7+
avahi fftw bluez-libs
8+

ci/bionic.build.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
export SCORE_DIR=$PWD
4+
5+
mkdir -p /build || true
6+
cd /build
7+
8+
cmake $SCORE_DIR \
9+
-GNinja \
10+
-DSEGMENT_RELEASE=1 \
11+
-DCMAKE_INSTALL_PREFIX=install
12+
13+
cmake --build .
14+
cmake --build . --target install

ci/bionic.deps.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash -eux
2+
3+
sudo rm -rf /usr/local/cmake*
4+
ls /usr/local
5+
6+
sudo apt-get update -qq
7+
sudo apt-get install -qq software-properties-common wget
8+
9+
sudo apt purge --auto-remove cmake
10+
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
11+
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
12+
13+
sudo apt-get install -qq --force-yes \
14+
binutils clang-10 clang++-10 \
15+
libasound-dev \
16+
ninja-build cmake \
17+
libfftw3-dev \
18+
libsuil-dev liblilv-dev lv2-dev \
19+
qtbase5-dev qtdeclarative5-dev libqt5serialport5-dev libqt5websockets5-dev libqt5opengl5-dev \
20+
qtbase5-private-dev qtdeclarative5-private-dev \
21+
libbluetooth-dev libsdl2-dev libsdl2-2.0-0 \
22+
libglu1-mesa-dev libglu1-mesa libgles2-mesa-dev \
23+
libavahi-compat-libdnssd-dev libsamplerate0-dev \
24+
portaudio19-dev \
25+
libavcodec-dev libavdevice-dev libavutil-dev libavfilter-dev libavformat-dev libswresample-dev \
26+
libclang-10-dev
27+
28+
sudo snap remove cmake

ci/bullseye.build.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
export SCORE_DIR=$PWD
4+
5+
mkdir -p /build || true
6+
cd /build
7+
8+
cmake $SCORE_DIR \
9+
-GNinja \
10+
-DSEGMENT_RELEASE=1 \
11+
-DCMAKE_INSTALL_PREFIX=install
12+
13+
cmake --build .
14+
cmake --build . --target install

0 commit comments

Comments
 (0)