Skip to content

Commit 96bede6

Browse files
CI - Artifacts for faster testing (#702)
Cleanup Workflow Job is set to 14 days
1 parent fa55382 commit 96bede6

File tree

7 files changed

+143
-26
lines changed

7 files changed

+143
-26
lines changed

.ci/ci_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if [[ "$CI_NAME" == 'osx' || "$CI_NAME" == 'darwin' ]]; then
3030
mkdir build || exit 1
3131
cd build
3232
cmake -DPLATFORM=${PLATFORM} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=/usr/local ../ || exit 2
33-
make -j $(sysctl -n hw.ncpu) || exit 3 # Notes: The package creation is currently not supported because of strange errors.
33+
make -j $(sysctl -n hw.ncpu) package || exit 3
3434
cd ${CI_BUILD_DIR} && source /${CI_BUILD_DIR}/test/testrunner.sh || exit 4
3535
exit 0;
3636
exit 1 || { echo "---> Hyperion compilation failed! Abort"; exit 5; }

.github/workflows/cleanup.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Clean artifacts
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
jobs:
8+
clean:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: cleanup
12+
uses: glassechidna/artifact-cleaner@master
13+
with:
14+
minimumAge: 3024000 # all artifacts at least 14 days old

.github/workflows/pull-request.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Hyperion PR Build
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
7+
jobs:
8+
9+
######################
10+
###### Linux #########
11+
######################
12+
13+
Linux:
14+
name: ${{ matrix.dockerName }}
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
dockerTag: [ amd64, i386, armv6hf, armv7hf, aarch64 ]
19+
include:
20+
- dockerTag: amd64
21+
dockerName: Debian Stretch (AMD64)
22+
platform: x11
23+
- dockerTag: i386
24+
dockerName: Debian Stretch (i386)
25+
platform: x11
26+
- dockerTag: armv6hf
27+
dockerName: Debian Stretch (Raspberry Pi v1 & ZERO)
28+
platform: rpi
29+
- dockerTag: armv7hf
30+
dockerName: Debian Stretch (Raspberry Pi 2 & 3)
31+
platform: rpi
32+
- dockerTag: aarch64
33+
dockerName: Debian Stretch (Generic AARCH64)
34+
platform: amlogic
35+
36+
steps:
37+
- uses: actions/checkout@v1
38+
with:
39+
submodules: true
40+
41+
# Append PR number to version
42+
- name: Append PR number to version
43+
shell: bash
44+
run: 'echo -n -PR#${{ github.event.pull_request.number }} >> version'
45+
46+
# Build packages
47+
- name: Build packages
48+
env:
49+
DOCKER_TAG: ${{ matrix.dockerTag }}
50+
DOCKER_NAME: ${{ matrix.dockerName }}
51+
PLATFORM: ${{ matrix.platform }}
52+
shell: bash
53+
run: ./.ci/ci_build.sh
54+
55+
# Collecting deployable artifacts
56+
- name: Collecting deployable artifacts
57+
shell: bash
58+
run: |
59+
mkdir -p ${{ matrix.dockerTag }}
60+
mv deploy/Hyperion-* ${{ matrix.dockerTag }}
61+
62+
# Upload artifacts
63+
- name: Upload artifacts
64+
uses: actions/upload-artifact@v1
65+
with:
66+
name: ${{ matrix.dockerTag }}.zip
67+
path: ${{ matrix.dockerTag }}
68+
69+
######################
70+
###### macOS #########
71+
######################
72+
73+
macOS:
74+
name: macOS
75+
runs-on: macos-latest
76+
steps:
77+
- uses: actions/checkout@v1
78+
with:
79+
submodules: true
80+
81+
# Append PR number to version
82+
- name: Append PR number to version
83+
shell: bash
84+
run: echo -n "-PR#${{ github.event.pull_request.number }}" >> version
85+
86+
# Install dependencies
87+
- name: Install dependencies
88+
shell: bash
89+
run: ./.ci/ci_install.sh
90+
91+
# Build packages
92+
- name: Build packages
93+
env:
94+
PLATFORM: osx
95+
shell: bash
96+
run: ./.ci/ci_build.sh
97+
98+
# Collecting deployable artifacts
99+
- name: Collecting deployable artifacts
100+
shell: bash
101+
run: |
102+
mkdir -p macOS
103+
mv build/Hyperion-* macOS
104+
105+
# Upload artifacts
106+
- name: Upload artifacts
107+
uses: actions/upload-artifact@v1
108+
with:
109+
name: macOS.zip
110+
path: macOS
Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
name: GitHub Actions
2-
on: [push, pull_request]
1+
name: Hyperion CI Build
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
######################
8+
###### Linux #########
9+
######################
310

411
jobs:
512
Linux:
@@ -39,15 +46,9 @@ jobs:
3946
shell: bash
4047
run: ./.ci/ci_build.sh
4148

42-
# create/update github release (replacement for Microsoft Azure after the beta phase)
43-
44-
# - name: Create/Update GitHub release
45-
# if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
46-
# uses: docker://softprops/action-gh-release
47-
# with:
48-
# files: deploy/Hyperion.NG-*
49-
# env:
50-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
######################
50+
###### macOS #########
51+
######################
5152

5253
macOS:
5354
name: macOS
@@ -68,13 +69,3 @@ jobs:
6869
PLATFORM: osx
6970
shell: bash
7071
run: ./.ci/ci_build.sh
71-
72-
# create/update github release (replacement for Microsoft Azure after the beta phase)
73-
74-
# - name: Create/Update GitHub release
75-
# if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
76-
# uses: docker://softprops/action-gh-release
77-
# with:
78-
# files: deploy/Hyperion.NG-*
79-
# env:
80-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/hyperiond/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,5 +256,8 @@ if(CMAKE_HOST_UNIX)
256256
install(CODE "FILE (REMOVE ${CMAKE_BINARY_DIR}/symlink_hyperiond )" COMPONENT "${PLATFORM}" )
257257
endif(CMAKE_HOST_UNIX)
258258

259-
# Copy dependencies
260-
InstallDependencies("hyperiond" ${PLATFORM})
259+
260+
# Copy dependencies (not for OSX)
261+
if (NOT ENABLE_OSX)
262+
InstallDependencies("hyperiond" ${PLATFORM})
263+
endif ()

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.0-alpha.2
1+
2.0.0-alpha.2

0 commit comments

Comments
 (0)