-
Notifications
You must be signed in to change notification settings - Fork 40
107 lines (103 loc) · 3.22 KB
/
build.yml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Build
on:
push:
branches:
- main
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Initialize submodules
run: |
git submodule update --init
- name: Install gcc-arm-none-eabi-10.3
run: |
wget -q "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2"
sudo tar -xf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 -C /opt
echo '/opt/gcc-arm-none-eabi-10.3-2021.10/bin' >> $GITHUB_PATH
- name: Install packages build sbtools required
run: |
sudo apt-get update
sudo apt-get install libcrypto++-dev libusb-1.0-0-dev -y
- uses: actions/cache@v3
id: sbtools-cache
with:
path: tools/sbtools
key: ${{ runner.os }}-${{ hashFiles('tools/sbtools/*') }}
- name: Build sbtools
if: steps.sbtools-cache.outputs.cache-hit != 'true'
run: |
cd tools/sbtools
make
cd ../..
- uses: actions/cache@v3
id: sys_signer-cache
with:
path: tools/sys_signer
key: ${{ runner.os }}-${{ hashFiles('tools/sys_signer/**/*') }}
- name: Build sys signer
if: steps.sys_signer-cache.outputs.cache-hit != 'true'
run: |
cd tools/sys_signer
cmake .
cmake --build .
cp sysigner ../
cd ../..
- uses: actions/cache@v3
id: mpy-cache
with:
path: Libs/src/micropython-master/ports/eoslib
key: ${{ runner.os }}-${{ hashFiles('Libs/src/micropython-master/ports/eoslib/**/*') }}
- name: Build micropython
if: steps.mpy-cache.outputs.cache-hit != 'true'
run: |
cd Libs/src/micropython-master/ports/eoslib
make
cd ../../../../..
- uses: actions/cache@v3
id: khicas-cache
with:
path: |
Libs/libcas.libcpp
Libs/libcasgui.libcpp
key: ${{ runner.os }}-${{ hashFiles('Libs/src/khicas/*') }}
- name: Build KhiCAS
if: steps.khicas-cache.outputs.cache-hit != 'true'
run: |
cd Libs/src/khicas/
make clean
make
cd ../../..
- name: CMake configure
run: |
echo "#pragma once" > System/UI_build_stamp.h
echo "#define BUILD_STAMP \"Release build ${{ github.run_number }}\"" >> System/UI_build_stamp.h
mkdir build
cmake -S . -B build
- name : CMake build
run: |
cmake --build build
- name: Create GitHub release
if: github.ref_name == 'main'
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: build-${{ github.run_number }}
title: build ${{ github.run_number }}
prerelease: false
files: |
build/System/ExistOS.sys
build/OSLoader/OSLoader.sb
build/System/sys_symtab.txt
- name: Upload Build outputs
if: github.ref_name != 'main'
uses: actions/upload-artifact@v3
with:
name: Build outputs
path: |
build/System/ExistOS.sys
build/OSLoader/OSLoader.sb
build/System/sys_symtab.txt