Skip to content

Commit

Permalink
Merge pull request #27 from gerickson/user/gerickson/github-issue-26-…
Browse files Browse the repository at this point in the history
…apple-silicon-ci-support

Ensure that GitHub Workflow Actions Continuous Integration Works with Apple Silicon
  • Loading branch information
gerickson authored Aug 23, 2024
2 parents 651b5a4 + a45505f commit c8d45cb
Show file tree
Hide file tree
Showing 80 changed files with 10,522 additions and 6,672 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ jobs:
runs-on: ubuntu-latest
name: "Linux ${{matrix.compiler['name']}} [${{matrix.configuration['name']}}]"

# Coverage seems to have a problem on Linux with clang due to an
# 'atexit' issue during linking of the test executables. So, only
# assert '--enable-coverage' for GCC.

strategy:
matrix:
compiler:
- { name: GCC, c: gcc, cxx: g++, options: "" }
- { name: GCC, c: gcc, cxx: g++, options: "--enable-coverage" }
- { name: clang/LLVM, c: clang, cxx: clang++, options: "" }
configuration:
- { name: "Debug", options: "--enable-debug" }
Expand Down Expand Up @@ -127,8 +131,7 @@ jobs:

- name: Bootstrap and Configure
run: |
export PATH="$(brew --prefix m4)/bin:${PATH}"
./bootstrap-configure -C ${{matrix.configuration['options']}} --enable-coverage --with-boost=/usr/local --with-libnl-includes=/usr/include/libnl3 --with-corefoundation-source=cflite --disable-docs
./bootstrap-configure -C ${{matrix.configuration['options']}} ${{matrix.compiler['options']}} --with-boost=/usr/local --with-libnl-includes=/usr/include/libnl3 --with-corefoundation-source=cflite --disable-docs
- name: Coding Style
run: |
Expand All @@ -146,8 +149,15 @@ jobs:
run: |
bash <(curl -s https://codecov.io/bash) -g 'src/*' -G 'src/lib/*/tests/*' -G 'tests/*' -G 'third_party/*'
# On macOS, Intel versus Apple silicon has created variability as
# far as Homebrew is concerned. On the former, Homebrew formulae are
# installed in /usr/local and on the latter, in
# /opt/homebrew. There's no way to know apriori on which
# architecture the job will run. Consequently, we attempt to handle
# both.

macos:
runs-on: macos-10.15
runs-on: macos-latest
name: "macOS ${{matrix.compiler['name']}} [${{matrix.configuration['name']}}]"
strategy:
matrix:
Expand All @@ -160,7 +170,10 @@ jobs:
env:
CC: ${{matrix.compiler['c']}}
CXX: ${{matrix.compiler['cxx']}}
XML_CATALOG_FILES: /usr/local/etc/xml/catalog
CPPFLAGS: "-I/opt/homebrew/include -I/usr/local/include"
LDFLAGS: "-L/opt/homebrew/lib -L/usr/local/lib"
XML_CATALOG_FILES: "/opt/homebrew/etc/xml/catalog /usr/local/etc/xml/catalog"

steps:

- name: Checkout
Expand All @@ -172,8 +185,9 @@ jobs:
- name: Bootstrap and Configure
run: |
eval "$(brew shellenv)"
export PATH="$(brew --prefix m4)/bin:${PATH}"
./bootstrap-configure -C ${{matrix.configuration['options']}} --enable-coverage --with-boost=/usr/local --disable-docs
./bootstrap-configure -C ${{matrix.configuration['options']}} --enable-coverage --with-boost="$(brew --prefix boost)" --with-cppunit="$(brew --prefix cppunit)" --disable-docs
- name: Coding Style
run: |
Expand Down
11 changes: 11 additions & 0 deletions Makefile-bootstrap
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#
# Copyright 2019 Google LLC. All Rights Reserved.
# Copyright 2017-2018 Nest Labs Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -36,6 +37,7 @@
# path = third_party/nlunit-test/repo
# url = [email protected]:nestlabs/nlunit-test.git
# branch = master
# commit = 561a155bb7257e54198cf5496f74ed5bc41cf85f
# update = none
#

Expand All @@ -56,6 +58,15 @@ abs_top_nlbuild_autotools_dir ?= $(abs_top_srcdir)/$(nlbuild_autotools_stem)
include $(abs_top_nlbuild_autotools_dir)/make/pre.mak
include $(abs_top_nlbuild_autotools_dir)/make/host/tools/bootstrap.mak

# If repos have been defined, create them as the default target goal;
# otherwise, default to help.

ifneq ($(REPOS),)
.DEFAULT_GOAL := repos
else
.DEFAULT_GOAL := help
endif # REPOS

#
# Add any project-specific bootstrap help commands to this
# 'help-hook' target.
Expand Down
14 changes: 6 additions & 8 deletions bootstrap
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/bin/sh
#!/usr/bin/env bash

#
# Copyright 2020 nlbuild-autotools Authors. All Rights Reserved.
# Copyright 2020 Google LLC. All Rights Reserved.
# Copyright 2016 Nest Labs Inc. All Rights Reserved.
#
# Licensed 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
# 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,
Expand All @@ -27,10 +29,6 @@

nlbuild_autotools_stem="third_party/nlbuild-autotools/repo"

# Establish some key directories
abs_srcdir=$(cd $(dirname "${0}") && pwd)

srcdir=`dirname ${0}`
abs_srcdir=`pwd`
abs_top_srcdir="${abs_srcdir}"

exec ${srcdir}/${nlbuild_autotools_stem}/scripts/bootstrap -I "${abs_top_srcdir}/${nlbuild_autotools_stem}" $*
(cd "${abs_srcdir}" && exec "${abs_srcdir}/${nlbuild_autotools_stem}/scripts/bootstrap" -I "${abs_srcdir}/${nlbuild_autotools_stem}" "${@}")
12 changes: 6 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ AC_CHECK_TOOL(STRIP, strip)

# Check for other host tools.

AC_PROG_EGREP
AC_PROG_INSTALL
AC_PROG_LN_S

Expand Down Expand Up @@ -391,7 +392,7 @@ NL_WITH_REQUIRED_EXTERNAL_PACKAGE([Boost],
# CFUtilities
#

NL_WITH_PACKAGE(
NL_WITH_REQUIRED_INTERNAL_PACKAGE(
[CFUtilities],
[CFUTILITIES],
[cfutilities],
Expand Down Expand Up @@ -444,7 +445,7 @@ AM_CONDITIONAL([OPENHLX_WITH_CFUTILITIES_INTERNAL], [test "${nl_with_cfutilities
# LogUtilities
#

NL_WITH_PACKAGE(
NL_WITH_REQUIRED_INTERNAL_PACKAGE(
[LogUtilities],
[LOGUTILITIES],
[logutilities],
Expand Down Expand Up @@ -530,7 +531,7 @@ esac
# Libtelnet
#

NL_WITH_PACKAGE(
NL_WITH_REQUIRED_INTERNAL_PACKAGE(
[Libtelnet],
[LIBTELNET],
[libtelnet],
Expand Down Expand Up @@ -583,7 +584,7 @@ AM_CONDITIONAL([OPENHLX_WITH_LIBTELNET_INTERNAL], [test "${nl_with_libtelnet}" =
# Nlassert
#

NL_WITH_PACKAGE(
NL_WITH_REQUIRED_INTERNAL_PACKAGE(
[Nlassert],
[NLASSERT],
[nlassert],
Expand Down Expand Up @@ -637,7 +638,7 @@ AM_CONDITIONAL([OPENHLX_WITH_NLASSERT_INTERNAL], [test "${nl_with_nlassert}" = "
#

if test "${nl_cv_build_tests}" = "yes"; then
NL_WITH_PACKAGE(
NL_WITH_REQUIRED_INTERNAL_PACKAGE(
[Nlunit-test],
[NLUNIT_TEST],
[nlunit_test],
Expand Down Expand Up @@ -822,7 +823,6 @@ AC_DEFINE_UNQUOTED([OPENHLX_CF_SOURCE_CFLITE],[${OPENHLX_CF_SOURCE_CFLITE}],[Def
# Check for headers
#
AC_HEADER_STDBOOL
AC_HEADER_STDC

AC_CHECK_HEADERS([regex.h])
AC_CHECK_HEADERS([stdint.h])
Expand Down
6 changes: 3 additions & 3 deletions repos.conf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[submodule "CFUtilities"]
path = third_party/CFUtilities/repo
url = https://github.com/Nuovations/CFUtilities.git
branch = release/1.0
commit = 1.1.1
branch = release/1.3
commit = 1.3.2
update = none
[submodule "LogUtilities"]
path = third_party/LogUtilities/repo
url = https://github.com/Nuovations/LogUtilities.git
branch = release/1.0
commit = 1.0.3
commit = 1.0.4
update = none
[submodule "libtelnet"]
path = third_party/libtelnet/repo
Expand Down
13 changes: 13 additions & 0 deletions third_party/nlbuild-autotools/README.third_party
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Name: Nest Labs Build - GNU Autotools
Short Name: nlbuild-autotools
URL: https://github.com/Nuovations/nlbuild-autotools/releases/download/1.7.8/nlbuild-autotools-1.7.8.tar.gz
Version: 1.7.8
Date: 2024-08-02T19:19:46-07:00
License: Apache 2.0

Description:
The Nest Labs Build - GNU Autotools (nlbuild-autotools) provides a customized,
turnkey build system framework, based on GNU autotools, for standalone Nest
Labs (or other) software packages that need to support not only building on and
targeting against standalone build host systems but also embedded target
systems using GCC-based or -compatible (such as clang/LLVM) toolchains.
2 changes: 1 addition & 1 deletion third_party/nlbuild-autotools/repo/.default-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.14
1.7.8
56 changes: 56 additions & 0 deletions third_party/nlbuild-autotools/repo/.github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# Copyright 2024 Project nlbuild-autotools Authors. All Rights Reserved.
#
# Licensed 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.
#

#
# Description:
# This file is the GitHub Actions hosted, distributed continuous
# integration configuration file for the Nest Labs nlbuild-autotools
# package.
#

---
name: Build

on: [push, pull_request]

jobs:

build:

runs-on: ${{matrix.os['runs-on']}}
name: "${{matrix.os['name']}}"

strategy:
matrix:
os:
- { name: macOS, runs-on: macos-latest }
- { name: Linux, runs-on: ubuntu-latest }

# At present, simply ensure that several targets can be
# successfully built.

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Build Distribution
run: make -j dist

- name: Build Host Tools
run: make -j tools

- name: Build Host Tools Distribution
run: make -j toolsdist
1 change: 1 addition & 0 deletions third_party/nlbuild-autotools/repo/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.local-version
tools/host/
26 changes: 26 additions & 0 deletions third_party/nlbuild-autotools/repo/AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
This is the official list of nlbuild-autotools authors for copyright purposes.

This does not necessarily list everyone who has contributed code, since in
some cases, their employer may be the copyright holder. To see the full list
of contributors, see the revision history in source control or
https://github.com/nestlabs/nlbuild-autotools/graphs/contributors.

Authors who wish to be recognized in this file should add themselves (or
their employing organization, as appropriate):

# Organizations

* Apple, Inc.
* Google LLC
* Nest Labs, Inc.

# Individuals

* Giuseppe Andreello <[email protected]>
* Adam Eliot <[email protected]>
* Grant Erickson <[email protected]>
* Betsy Lichtenberg <[email protected]>
* Robert Szewczyk <[email protected]>
* Rob Walker <[email protected]>
* Justin Wood <[email protected]>
* Yakun Xu <[email protected]>
Loading

0 comments on commit c8d45cb

Please sign in to comment.