Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@ on:

jobs:
ci:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
name: Erlang ${{matrix.otp}} / rebar ${{matrix.rebar3}}
strategy:
matrix:
otp: ['25', '26', '27']
otp: ['26', '27']
rebar3: ['3']
# latest rebar3 versions that do not give problems with selected OTPs
include:
- otp: '23'
rebar3: '3.20.0'
- otp: '24'
rebar3: '3.23.0'
- otp: '25'
rebar3: '3.24.0'
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
rebar3-version: ${{matrix.rebar3}}

- uses: actions/cache@v2
- uses: actions/cache@v4
env:
cache-name: rebar3
with:
Expand Down
7 changes: 7 additions & 0 deletions src/grisp_tools_build.erl
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ run(Configuration) ->
]},
{compile, [
fun configure/1,
fun update_preloaded/1,
fun boot/1,
fun install/1,
fun post/1
Expand Down Expand Up @@ -190,6 +191,12 @@ configure(#{build := Build, otp_version := {[Ver | _], _, _, _}} = S0) ->
event(S0, ['_skip'])
end.

update_preloaded(#{build := #{flags := #{update_prebuild := true}}} = State0) ->
Opts = [{cd, mapz:deep_get([paths, build], State0)}],
build_step("./otp_build update_preloaded --no-commit", Opts, State0);
update_preloaded(State0) ->
event(State0, ['_skip']).

boot(State0) ->
Opts = [{cd, mapz:deep_get([paths, build], State0)}],
build_step("./otp_build boot -a", Opts, State0).
Expand Down
13 changes: 13 additions & 0 deletions src/grisp_tools_step.erl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,19 @@ collect(#{project_root := Root, platform := Platform,
mapz:deep_put([build, hash], #{value => Hash, index => HashIndex}, S3).

toolchain(#{paths := #{toolchain := {docker, _}}} = S0) -> S0;
toolchain(#{platform := grisp_nano,
paths := #{toolchain := {directory, ToolchainRoot}}} = S0) ->
[error({toolchain_root_invalid, ToolchainRoot}) || not filelib:is_dir(ToolchainRoot)],
Files = [
["GRISP_TOOLCHAIN_REVISION"],
["GRISP_TOOLCHAIN_PLATFORM"],
["grisp_buildinfo.hrl"],
["arm-rtems6"],
["arm-rtems6", "stm32u5-grisp-nano"],
["bin","arm-rtems6-gcc"]
],
[ check_toolchain_file([ToolchainRoot|File]) || File <- Files],
S0;
toolchain(#{paths := #{toolchain := {directory, ToolchainRoot}}} = S0) ->
[error({toolchain_root_invalid, ToolchainRoot}) || not filelib:is_dir(ToolchainRoot)],
Files = [
Expand Down