1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Build Release
on:
push:
tags:
- 'release-*'
jobs:
build:
runs-on: self-hosted
steps:
- name: "Check Out"
uses: actions/checkout@v2
with:
token: ${{ secrets.GitHub_PAT }}
submodules: recursive
fetch-depth: 0
- name: "Style checking"
run: |
./config/pre-commit.hook --last
- name: Build Unit Tests
run: |
export JOBS=${JOBS:-$(nproc)} && \
echo "JOBS=${JOBS}" && \
./configure.sh linux Debug -G Ninja && \
pushd build-linux-Debug && \
ninja unittests && \
popd
- name: Run unit tests
run: |
export JOBS=${JOBS:-$(nproc)} && \
echo "JOBS=${JOBS}" && \
pushd build-linux-Debug && \
ninja check -j ${JOBS} && \
popd
- name: "Build and package for RT1051"
id: build_release_package
env:
ASSETS_LOGIN: ${{ secrets.ASSETS_LOGIN }}
ASSETS_TOKEN: ${{ secrets.ASSETS_TOKEN }}
run: |
export JOBS=${JOBS:-$(nproc)} && \
echo "JOBS=${JOBS}" && \
./configure.sh rt1051 RelWithDebInfo -DPURE_HW_TARGET=T6 -G Ninja && \
pushd build-rt1051-RelWithDebInfo && \
ninja -j ${JOBS} Pure&& \
ninja -j ${JOBS} PurePhone-UpdatePackage && \
ninja -j ${JOBS} PurePhone-StandaloneImage && \
popd && \
./print_last_changes.sh && \
uptime
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GitHub_PAT }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: true
body: ${{steps.build_release_package.outputs.release_notes }}
- name: Upload Standalone Package
id: upload-stanalone-package
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GitHub_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
# here we have to use relative path with starting "./"
asset_path: ./${{ steps.build_release_package.outputs.package_path }}/${{ steps.build_release_package.outputs.package-standalone }}
asset_name: ${{ steps.build_release_package.outputs.package-standalone }}
asset_content_type: ${{ steps.build_release_package.outputs.standalone-mime_type }}
- name: Upload Update Package
id: upload-update-package
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GitHub_PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
# here we have to use relative path with starting "./"
asset_path: ./${{ steps.build_release_package.outputs.package_path }}/${{ steps.build_release_package.outputs.package-update }}
asset_name: ${{ steps.build_release_package.outputs.package-update }}
asset_content_type: ${{ steps.build_release_package.outputs.update-mime_type }}