diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77bf4b2..17c49a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/src/grisp_tools_build.erl b/src/grisp_tools_build.erl index a908f7f..78abfe3 100644 --- a/src/grisp_tools_build.erl +++ b/src/grisp_tools_build.erl @@ -45,6 +45,7 @@ run(Configuration) -> ]}, {compile, [ fun configure/1, + fun update_preloaded/1, fun boot/1, fun install/1, fun post/1 @@ -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). diff --git a/src/grisp_tools_step.erl b/src/grisp_tools_step.erl index cb08a6e..48ea680 100644 --- a/src/grisp_tools_step.erl +++ b/src/grisp_tools_step.erl @@ -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 = [