forked from nanoframework/nf-interpreter
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (102 loc) · 4.48 KB
/
build_orgpal_mesh.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Build ORGPAL_MESH
on:
workflow_dispatch
jobs:
build_ORGPAL_MESH_NODE:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 'orgpal-mesh'
- uses: lukka/get-cmake@latest
- name: Install arm-none-eabi-gcc
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '12.2.Rel1'
- name: Tweak GCC path
run: |
$currentPath = "$env:ARM_NONE_EABI_GCC_PATH"
if($currentPath.EndsWith("bin"))
{
$fixedPath = $currentPath.Replace("\bin", "")
echo "ARM_NONE_EABI_GCC_PATH=$fixedPath" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
}
- name: Rename CMake presets
working-directory: ${{ github.workspace }}/config
run: |
$file = "user-tools-repos.json"
Rename-Item -Path "user-tools-repos.TEMPLATE.json" -NewName $file
[regex]$pattern='user-tools-repos-cloud'
$pattern.replace([IO.File]::ReadAllText($file), 'user-tools-repos', 1) | Out-File $file -Encoding UTF8
$file = "user-prefs.json"
Rename-Item -Path "user-prefs.TEMPLATE.json" -NewName $file
$filecontent = Get-Content($file)
attrib $file -r
$filecontent -replace 'Debug', 'MinSizeRel' | Out-File $file -Encoding UTF8
- name: Add dummy CMake presets
working-directory: ${{ github.workspace }}/targets-community
run: |
New-Item -Path . -Name "CMakePresets.json" -ItemType "file" -Value "{`n""version"": 4,`n""include"": []`n}"
- run: nbgv cloud -a -c
- uses: lukka/run-cmake@v10
with:
configurePreset: 'ORGPAL_MESH_NODE'
configurePresetAdditionalArgs: "['-DBUILD_VERSION=${{env.NBGV_VersionMajor}}.${{env.NBGV_VersionMinor}}.${{env.NBGV_BuildNumber}}.${{env.NBGV_VersionHeight}}','-DCMAKE_BUILD_TYPE=MinSizeRel']"
buildPreset: 'ORGPAL_MESH_NODE'
buildPresetAdditionalArgs: "['--config MinSizeRel']"
- uses: actions/upload-artifact@v3
with:
name: 'ORGPAL_MESH_NODE-v${{env.NBGV_VersionMajor}}.${{env.NBGV_VersionMinor}}.${{env.NBGV_BuildNumber}}.${{env.NBGV_VersionHeight}}'
path: |
${{ github.workspace }}/build/*.bin
${{ github.workspace }}/build/*.hex
build_ORGPAL_MESH_HUB:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: 'orgpal-mesh'
- uses: lukka/get-cmake@latest
- name: Install arm-none-eabi-gcc
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: 'latest'
- name: Tweak GCC path
run: |
$currentPath = "$env:ARM_NONE_EABI_GCC_PATH"
if($currentPath.EndsWith("bin"))
{
$fixedPath = $currentPath.Replace("\bin", "")
echo "ARM_NONE_EABI_GCC_PATH=$fixedPath" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
}
- name: Rename CMake presets
working-directory: ${{ github.workspace }}/config
run: |
$file = "user-tools-repos.json"
Rename-Item -Path "user-tools-repos.TEMPLATE.json" -NewName $file
[regex]$pattern='user-tools-repos-cloud'
$pattern.replace([IO.File]::ReadAllText($file), 'user-tools-repos', 1) | Out-File $file -Encoding UTF8
$file = "user-prefs.json"
Rename-Item -Path "user-prefs.TEMPLATE.json" -NewName $file
$filecontent = Get-Content($file)
attrib $file -r
$filecontent -replace 'Debug', 'MinSizeRel' | Out-File $file -Encoding UTF8
- name: Add dummy CMake presets
working-directory: ${{ github.workspace }}/targets-community
run: |
New-Item -Path . -Name "CMakePresets.json" -ItemType "file" -Value "{`n""version"": 4,`n""include"": []`n}"
- run: nbgv cloud -a -c
- uses: lukka/run-cmake@v10
with:
configurePreset: 'ORGPAL_MESH_HUB'
configurePresetAdditionalArgs: "['-DBUILD_VERSION=${{env.NBGV_VersionMajor}}.${{env.NBGV_VersionMinor}}.${{env.NBGV_BuildNumber}}.${{env.NBGV_VersionHeight}}','-DCMAKE_BUILD_TYPE=MinSizeRel']"
buildPreset: 'ORGPAL_MESH_HUB'
buildPresetAdditionalArgs: "['--config MinSizeRel']"
- uses: actions/upload-artifact@v4
with:
name: 'ORGPAL_MESH_HUB-v${{env.NBGV_VersionMajor}}.${{env.NBGV_VersionMinor}}.${{env.NBGV_BuildNumber}}.${{env.NBGV_VersionHeight}}'
path: |
${{ github.workspace }}/build/*.bin
${{ github.workspace }}/build/*.hex