This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-mcumgr.git

commit 0a9eeef5da3509ace2e26cf4ef8ee5b89c2166f8
Author: Szymon Janc <[email protected]>
AuthorDate: Mon Oct 6 15:50:37 2025 +0200

    ci: Add basic Github Actions workflow
    
    This runs newt test and samples build for nRF52840.
---
 .github/project.yml                   | 41 +++++++++++++++++++++
 .github/workflows/build_cc_target.yml | 67 +++++++++++++++++++++++++++++++++++
 .github/workflows/newt_test_all.yml   | 62 ++++++++++++++++++++++++++++++++
 3 files changed, 170 insertions(+)

diff --git a/.github/project.yml b/.github/project.yml
new file mode 100644
index 0000000..487094d
--- /dev/null
+++ b/.github/project.yml
@@ -0,0 +1,41 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+project.name: "my_project"
+
+project.repositories:
+    - apache-mynewt-core
+
+# Use github's distribution mechanism for core ASF libraries.
+# This provides mirroring automatically for us.
+#
+repository.apache-mynewt-core:
+    type: github
+    vers: 0.0.0
+    user: apache
+    repo: mynewt-core
+
+project.repositories.allowed:
+       - apache-mynewt-core
+       - apache-mynewt-nimble
+       - apache-mynewt-mcumgr
+       - mcuboot
+       - mbedtls
+       - nordic-nrfx
+       - arm-CMSIS_5
diff --git a/.github/workflows/build_cc_target.yml 
b/.github/workflows/build_cc_target.yml
new file mode 100644
index 0000000..1597197
--- /dev/null
+++ b/.github/workflows/build_cc_target.yml
@@ -0,0 +1,67 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+name: Build check
+
+on: [push, pull_request]
+
+jobs:
+  targets:
+    name: Build GCC test target
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-latest]
+        gcc: ['14.2.Rel1', '13.2.Rel1', '12.2.Rel1', '11.3.Rel1', 
'10.3-2021.10', '9-2020-q2', '8-2019-q3']
+    runs-on: ${{ matrix.os }}
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-go@v3
+        with:
+          go-version: 'stable'
+      - uses: carlosperate/[email protected]
+        with:
+          release: ${{ matrix.gcc }}
+      - name: Install newt
+        shell: bash
+        run: |
+             go version
+             go install mynewt.apache.org/newt/newt@latest
+      - name: Setup project
+        shell: bash
+        run: |
+             newt new build
+             cp -f .github/project.yml build/project.yml
+             cd build
+             newt upgrade --shallow=1
+             rm -rf repos/apache-mynewt-mcumgr
+             git clone .. repos/apache-mynewt-mcumgr
+             cd ..
+      - name: Build test target
+        shell: bash
+        run: |
+             cd build
+             newt target create cc_test1
+             newt target set cc_test1 
bsp="@apache-mynewt-core/hw/bsp/nordic_pca10056"
+             newt target set cc_test1 
app="@apache-mynewt-mcumgr/samples/omp_svr/mynewt"
+             newt build -j 1 cc_test1
+             newt target create cc_test2
+             newt target set cc_test2 
bsp="@apache-mynewt-core/hw/bsp/nordic_pca10056"
+             newt target set cc_test2 
app="@apache-mynewt-mcumgr/samples/smp_svr/mynewt"
+             newt build -j 1 cc_test2
diff --git a/.github/workflows/newt_test_all.yml 
b/.github/workflows/newt_test_all.yml
new file mode 100644
index 0000000..90696df
--- /dev/null
+++ b/.github/workflows/newt_test_all.yml
@@ -0,0 +1,62 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+name: Unit tests
+
+on: [push, pull_request]
+
+jobs:
+  newt_test:
+    name: Run newt test all
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-latest, macos-13]
+    runs-on: ${{ matrix.os }}
+    steps:
+      - uses: actions/checkout@v3
+      - uses: actions/setup-go@v3
+        with:
+          go-version: 'stable'
+      - name: Install Dependencies
+        if: matrix.os == 'ubuntu-latest'
+        shell: bash
+        run: |
+             sudo apt-get update
+             sudo apt-get install -y gcc-multilib
+      - name: Install newt
+        shell: bash
+        run: |
+             go version
+             go install mynewt.apache.org/newt/newt@latest
+      - name: Setup project
+        shell: bash
+        run: |
+             newt new build
+             cp -f .github/project.yml build/project.yml
+             cd build
+             newt upgrade --shallow=1
+             rm -rf repos/apache-mynewt-mcumgr
+             git clone .. repos/apache-mynewt-mcumgr
+             cd ..
+      - name: newt test all
+        shell: bash
+        run: |
+             cd build
+             newt test all

Reply via email to