Build ORGPAL_MESH #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build ORGPAL_MESH | |
on: | |
workflow_dispatch | |
jobs: | |
build_ORGPAL_MESH_NODE: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
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@v3 | |
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@v2 | |
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 |