Skip to content

Commit 7089dc9

Browse files
authored
Merge pull request #319 from microsoft/release/v0.4.0
Release v0.4.0
2 parents 8c51a0f + f8a69e7 commit 7089dc9

File tree

165 files changed

+2355
-498
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+2355
-498
lines changed

.docker/netremote-dev/Dockerfile

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

2-
FROM ubuntu:mantic as netremote-build
2+
FROM ubuntu:noble as netremote-build
33

44
# Set arguments used only in this Dockerfile.
5-
ARG BUILD_DATE="2024-02-28T21:09:49+00:00"
5+
ARG BUILD_DATE="2024-06-30T02:17:53+00:00"
66
ARG DEBIAN_FRONTEND=noninteractive
77
ARG APT_ARGS_COMMON="-yqq --no-install-recommends"
88

9-
LABEL maintainer="Andrew Beltrano (anbeltra@microsoft.com)"
9+
LABEL org.opencontainers.image.authors = "netremoteowners@microsoft.com"
1010
LABEL org.label-schema.build-date = "${BUILD_DATE}"
11-
LABEL org.label-schema.name = "Microsoft NetRemote build environment"
11+
LABEL org.label-schema.name = "NetRemote build environment"
1212
LABEL org.label-schema.description = "Build environment for the NetRemote project"
1313
LABEL org.label-schema.vendor = "Microsoft"
1414
LABEL org.label-schema.version = "1.0.0"
@@ -22,13 +22,13 @@ LABEL org.label-schema.schema-version = "1.0"
2222
# sudo apt -y update && sudo apt -y upgrade
2323
#
2424
# 2. Install core build tools and dependencies:
25-
# sudo apt install -y --no-install-recommends autoconf automake autopoint build-essential ca-certificates cmake curl dotnet7 git gnupg libltdl-dev libmount-dev libtool linux-libc-dev ninja-build pkg-config python3-jinja2 tar unzip zip
25+
# sudo apt install -y --no-install-recommends autoconf automake autopoint build-essential ca-certificates cmake curl dotnet7 git gnupg libltdl-dev libmount-dev libtool linux-libc-dev libstdc++-14-dev ninja-build pkg-config python3-jinja2 tar unzip zip
2626
#
27-
# 3. Install complete LLVM 17 + clang 17 toolchain:
28-
# sudo apt install -y --no-install-recommends libllvm-17-ocaml-dev libllvm17 llvm-17 llvm-17-dev llvm-17-doc llvm-17-examples llvm-17-runtime clang-17 clang-tools-17 clang-17-doc libclang-common-17-dev libclang-17-dev libclang1-17 clang-format-17 python3-clang-17 clangd-17 clang-tidy-17 libclang-rt-17-dev libpolly-17-dev libfuzzer-17-dev lldb-17 lld-17 libc++-17-dev libc++abi-17-dev libomp-17-dev libclc-17-dev libunwind-17-dev libmlir-17-dev mlir-17-tools libbolt-17-dev bolt-17 flang-17 libclang-rt-17-dev-wasm32 libclang-rt-17-dev-wasm64 libc++-17-dev-wasm32 libc++abi-17-dev-wasm32 libclang-rt-17-dev-wasm32 libclang-rt-17-dev-wasm64
27+
# 3. Install complete LLVM 18 + clang toolchain:
28+
# sudo apt install -y --no-install-recommends libllvm-18-ocaml-dev libllvm18 llvm-18 llvm-18-dev llvm-18-doc llvm-18-examples llvm-18-runtime clang-18 clang-tools-18 clang-18-doc libclang-common-18-dev libclang-18-dev libclang1-18 clang-format-18 python3-clang-18 clangd-18 clang-tidy-18 libclang-rt-18-dev libpolly-18-dev libfuzzer-18-dev lldb-18 libc++-18-dev libc++abi-18-dev libomp-18-dev libclc-18-dev libunwind-18-dev libmlir-18-dev mlir-18-tools libbolt-18-dev bolt-18 flang-18 libclang-rt-18-dev-wasm32 libclang-rt-18-dev-wasm64 libc++-18-dev-wasm32 libc++abi-18-dev-wasm32 libclang-rt-18-dev-wasm32 libclang-rt-18-dev-wasm64 libllvmlibc-18-dev
2929
#
3030
# 4. Install other development dependencies and helpful tools:
31-
# sudo apt install -y --no-install-recommends bc bison dwarves flex libelf-dev dos2unix file gnupg2 iproute2 mtools neofetch rsync ssh sudo emacs gdb kmod nano policycoreutils-python-utils python-is-python3 vim
31+
# sudo apt install -y -qq --no-install-recommends bc bison dwarves flex libelf-dev dos2unix file gnupg2 iproute2 mtools neofetch rsync ssh sudo emacs gdb kmod nano policycoreutils-python-utils python-is-python3 vim
3232
#
3333
# 5. Install hostapd development dependencies and tools:
3434
# sudo apt install -y libnl-3-dev libssl-dev libnl-genl-3-dev libnl-3-dev libdbus-c++-dev libnl-route-3-dev flex bison dwarves libelf-dev bc iw debconf-utils
@@ -47,59 +47,59 @@ RUN apt-get $APT_ARGS_COMMON update && \
4747
ca-certificates \
4848
cmake \
4949
curl \
50-
dotnet7 \
5150
git \
5251
gnupg \
5352
libltdl-dev \
5453
libmount-dev \
5554
libtool \
5655
linux-libc-dev \
56+
libstdc++-14-dev \
5757
ninja-build \
5858
pkg-config \
5959
python3-jinja2 \
6060
tar \
6161
unzip \
6262
zip \
63-
# LLVM + Clang toolchain.
64-
# libllvm-17-ocaml-dev libllvm17 llvm-17 llvm-17-dev llvm-17-doc llvm-17-examples llvm-17-runtime clang-17 clang-tools-17 clang-17-doc libclang-common-17-dev libclang-17-dev libclang1-17 clang-format-17 python3-clang-17 clangd-17 clang-tidy-17 libclang-rt-17-dev libpolly-17-dev libfuzzer-17-dev lldb-17 lld-17 libc++-17-dev libc++abi-17-dev libomp-17-dev libclc-17-dev libunwind-17-dev libmlir-17-dev mlir-17-tools libbolt-17-dev bolt-17 flang-17 libclang-rt-17-dev-wasm32 libclang-rt-17-dev-wasm64 libc++-17-dev-wasm32 libc++abi-17-dev-wasm32 libclang-rt-17-dev-wasm32 libclang-rt-17-dev-wasm64
65-
bolt-17 \
66-
clang-17 \
67-
clang-17-doc \
68-
clang-format-17 \
69-
clang-tidy-17 \
70-
clang-tools-17 \
71-
clangd-17 \
72-
flang-17 \
73-
libbolt-17-dev \
74-
libc++-17-dev \
75-
libc++-17-dev-wasm32 \
76-
libc++abi-17-dev \
77-
libc++abi-17-dev-wasm32 \
78-
libclang-17-dev \
79-
libclang-common-17-dev \
80-
libclang-rt-17-dev \
81-
libclang-rt-17-dev-wasm32 \
82-
libclang-rt-17-dev-wasm32 \
83-
libclang-rt-17-dev-wasm64 \
84-
libclang-rt-17-dev-wasm64 \
85-
libclang1-17 \
86-
libclc-17-dev \
87-
libfuzzer-17-dev \
88-
libllvm-17-ocaml-dev \
89-
libllvm17 \
90-
libmlir-17-dev \
91-
libomp-17-dev \
92-
libpolly-17-dev \
93-
libunwind-17-dev \
94-
lld-17 \
95-
lldb-17 \
96-
llvm-17 \
97-
llvm-17-dev \
98-
llvm-17-doc \
99-
llvm-17-examples \
100-
llvm-17-runtime \
101-
mlir-17-tools \
102-
python3-clang-17 \
63+
# LLVM + Clang 18 toolchain.
64+
# libllvm-18-ocaml-dev libllvm18 llvm-18 llvm-18-dev llvm-18-doc llvm-18-examples llvm-18-runtime clang-18 clang-tools-18 clang-18-doc libclang-common-18-dev libclang-18-dev libclang1-18 clang-format-18 python3-clang-18 clangd-18 clang-tidy-18 libclang-rt-18-dev libpolly-18-dev libfuzzer-18-dev lldb-18 libc++-18-dev libc++abi-18-dev libomp-18-dev libclc-18-dev libunwind-18-dev libmlir-18-dev mlir-18-tools libbolt-18-dev bolt-18 flang-18 libclang-rt-18-dev-wasm32 libclang-rt-18-dev-wasm64 libc++-18-dev-wasm32 libc++abi-18-dev-wasm32 libclang-rt-18-dev-wasm32 libclang-rt-18-dev-wasm64 libllvmlibc-18-dev
65+
libllvm-18-ocaml-dev \
66+
libllvm18 \
67+
llvm-18 \
68+
llvm-18-dev \
69+
llvm-18-doc \
70+
llvm-18-examples \
71+
llvm-18-runtime \
72+
clang-18 \
73+
clang-tools-18 \
74+
clang-18-doc \
75+
libclang-common-18-dev \
76+
libclang-18-dev \
77+
libclang1-18 \
78+
clang-format-18 \
79+
python3-clang-18 \
80+
clangd-18 \
81+
clang-tidy-18 \
82+
libclang-rt-18-dev \
83+
libpolly-18-dev \
84+
libfuzzer-18-dev \
85+
lldb-18 \
86+
libc++-18-dev \
87+
libc++abi-18-dev \
88+
libomp-18-dev \
89+
libclc-18-dev \
90+
libunwind-18-dev \
91+
libmlir-18-dev \
92+
mlir-18-tools \
93+
libbolt-18-dev \
94+
bolt-18 \
95+
flang-18 \
96+
libclang-rt-18-dev-wasm32 \
97+
libclang-rt-18-dev-wasm64 \
98+
libc++-18-dev-wasm32 \
99+
libc++abi-18-dev-wasm32 \
100+
libclang-rt-18-dev-wasm32 \
101+
libclang-rt-18-dev-wasm64 \
102+
libllvmlibc-18-dev \
103103
# hostapd build dependencies.
104104
# libnl-3-200-dbg libnl-3-dev libssl-dev libnl-genl-3-dev
105105
libnl-3-200-dbg \
@@ -128,7 +128,7 @@ RUN mkdir -p ${VCPKG_BINARY_CACHE}
128128
# Obtain vcpkg, bootstrap it, and install dependencies.
129129
COPY vcpkg.json .
130130

131-
RUN git clone https://github.com/microsoft/vcpkg.git --depth 1 && \
131+
RUN git clone https://github.com/microsoft/vcpkg.git && \
132132
./vcpkg/bootstrap-vcpkg.sh && \
133133
./vcpkg/vcpkg install --clean-buildtrees-after-build --clean-downloads-after-build
134134

@@ -140,7 +140,7 @@ ENTRYPOINT [ "/bin/entrypoint-build.sh" ]
140140

141141
FROM netremote-build as netremote-dev
142142

143-
LABEL org.label-schema.name = "Microsoft NetRemote development environment"
143+
LABEL org.label-schema.name = "NetRemote development environment"
144144
LABEL org.label-schema.description = "Development environment for the NetRemote project"
145145

146146
# Install packages.
@@ -174,8 +174,10 @@ RUN apt-get $APT_ARGS_COMMON update && \
174174
python-is-python3 \
175175
vim \
176176
# Wireless tools.
177+
# iw
177178
iw \
178179
# Packaging tools.
180+
# debconf-utils
179181
debconf-utils \
180182
&& \
181183
# Reduce image size by removing package cache.

.docker/netremote-dev/entrypoint-build.sh

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,24 @@
22

33
set -euf -o pipefail
44

5-
REPOSITORY_ROOT=${1:-${PWD}}
5+
readonly REPOSITORY_ROOT="${1:-${PWD}}"
6+
readonly CMAKE_PRESET_CONFIGURE="${2:-cicd-linux}"
7+
readonly CMAKE_PRESET_BUILD="${3:-build-cicd-linux}"
8+
readonly CMAKE_PRESET_PACKAGE="${4:-cicd-linux}"
9+
readonly CMAKE_PRESET_TEST="${5:-test-cicd-linux}"
10+
readonly CMAKE_BUILD_CONFIG="${6:-Debug}"
11+
12+
echo "------------------------------------"
13+
echo "Build entrypoint script parameters:"
14+
echo "------------------------------------"
15+
echo "Source Repository Root=${REPOSITORY_ROOT}"
16+
echo "CMake"
17+
echo " Build Configuration=${CMAKE_BUILD_CONFIG}"
18+
echo " Presets"
19+
echo " Configure='${CMAKE_PRESET_CONFIGURE}'"
20+
echo " Build='${CMAKE_PRESET_BUILD}'"
21+
echo " Test='${CMAKE_PRESET_TEST}'"
22+
echo " Package='${CMAKE_PRESET_PACKAGE}'"
623

724
# Verify the repository root is a git repository.
825
if [[ ! -d ${REPOSITORY_ROOT}/.git ]]; then
@@ -16,17 +33,11 @@ if [[ ! -f ${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake ]]; then
1633
exit 1
1734
fi
1835

19-
# Assign cmake presets.
20-
# TODO: these should be passed in as arguments instead.
21-
PRESET_CONFIGURE=release-linux
22-
PRESET_BUILD=release-linux-debug
23-
BUILD_CONFIG=Debug
24-
2536
# Add the workspace directory to the safe directory list.
26-
git config --global --add safe.directory ${REPOSITORY_ROOT}
37+
git config --global --add safe.directory "${REPOSITORY_ROOT}"
2738

28-
# Change to the root of the repo.
29-
cd ${REPOSITORY_ROOT}
30-
cmake --preset ${PRESET_CONFIGURE}
31-
cmake --build --preset ${PRESET_BUILD}
32-
cmake --install out/build/${PRESET_CONFIGURE} --config ${BUILD_CONFIG}
39+
# Change to the root of the repo then execute then perform CMake configure, build, and test.
40+
cd "${REPOSITORY_ROOT}"
41+
cmake --preset "${CMAKE_PRESET_CONFIGURE}"
42+
cmake --build --preset "${CMAKE_PRESET_BUILD}"
43+
ctest --preset "${CMAKE_PRESET_TEST}" -C "${CMAKE_BUILD_CONFIG}"

.docker/netremote-dev/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
33
"name": "netremote",
4-
"version-string": "0.3.0",
4+
"version-string": "0.4.0",
55
"dependencies": [
66
{
77
"name": "sdbus-cpp",
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
11

22
name: 'Build'
33
description: 'Build the repository in a docker container'
4+
inputs:
5+
cmake-preset-configure:
6+
required: false
7+
default: 'dev-linux'
8+
description: 'The name of the preset to use for the CMake configure operation'
9+
cmake-preset-build:
10+
required: false
11+
default: 'build-dev-linux'
12+
description: 'The name of the preset to use for the CMake build operation'
13+
cmake-preset-package:
14+
required: false
15+
default: 'packaging-dev-linux'
16+
description: 'The name of the preset to use for the CMake package operation'
17+
cmake-build-config:
18+
required: false
19+
default: 'Debug'
20+
description: 'The build configuration to use for the CMake build operation'
421
runs:
522
using: 'docker'
623
image: 'docker://abeltrano/netremote-build:latest'
724
args:
825
- '/github/workspace'
26+
- ${{ inputs.cmake-preset-configure }}
27+
- ${{ inputs.cmake-preset-build }}
28+
- ${{ inputs.cmake-preset-package }}
29+
- ${{ inputs.cmake-build-config }}

.github/actions/build-with-host/action.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
name: 'build-on-host'
33
description: 'Build the repository on the runner host system'
44
inputs:
5+
os:
6+
required: true
7+
description: 'The target operating system to build for'
58
build-type:
69
required: false
710
default: 'Debug'
@@ -24,7 +27,7 @@ inputs:
2427
description: 'Publish build artifacts'
2528
preset-name:
2629
required: false
27-
default: 'dev-windows'
30+
default: 'dev'
2831
description: 'The name of the preset to use for all CMake operations (configure, build, test, install, package)'
2932

3033
runs:
@@ -36,43 +39,49 @@ runs:
3639
script: |
3740
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
3841
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
39-
core.exportVariable('VCPKG_DEFAULT_BINARY_CACHE', 'C:/vcpkg/archive');
4042
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite');
4143
42-
- name: Install vcpkg dependencies with Github Actions Cache
44+
- name: Install Linux build dependencies
45+
if: ${{ inputs.os == 'linux' }}
4346
run: |
44-
echo "VCPKG_DEFAULT_BINARY_CACHE=${VCPKG_DEFAULT_BINARY_CACHE}" >> "${GITHUB_ENV}"
45-
echo "VCPKG_BINARY_SOURCES=${VCPKG_BINARY_SOURCES}" >> "${GITHUB_ENV}"
46-
New-Item -Path ${env:VCPKG_DEFAULT_BINARY_CACHE} -ItemType Directory -Force
47-
shell: pwsh
47+
export DEBIAN_FRONTEND=noninteractive
48+
sudo -E apt-get update
49+
sudo -E apt-get upgrade
50+
# Install core build dependencies
51+
sudo -E apt-get install -qq --no-install-recommends autoconf automake autopoint build-essential ca-certificates cmake curl git gnupg libltdl-dev libmount-dev libtool linux-libc-dev libstdc++-14-dev ninja-build pkg-config python3-jinja2 tar unzip zip
52+
# Install LLVM 18 toolchain
53+
sudo -E apt-get install -qq --no-install-recommends libllvm-18-ocaml-dev libllvm18 llvm-18 llvm-18-dev llvm-18-doc llvm-18-examples llvm-18-runtime clang-18 clang-tools-18 clang-18-doc libclang-common-18-dev libclang-18-dev libclang1-18 clang-format-18 python3-clang-18 clangd-18 clang-tidy-18 libclang-rt-18-dev libpolly-18-dev libfuzzer-18-dev lldb-18 libc++-18-dev libc++abi-18-dev libomp-18-dev libclc-18-dev libunwind-18-dev libmlir-18-dev mlir-18-tools libbolt-18-dev bolt-18 flang-18 libclang-rt-18-dev-wasm32 libclang-rt-18-dev-wasm64 libc++-18-dev-wasm32 libc++abi-18-dev-wasm32 libclang-rt-18-dev-wasm32 libclang-rt-18-dev-wasm64 libllvmlibc-18-dev
54+
# Install hostapd dependencies
55+
sudo -E apt-get install -qq --no-install-recommends libnl-3-200-dbg libnl-3-dev libssl-dev libnl-genl-3-dev libdbus-c++-dev libnl-route-3-dev
56+
shell: bash
4857

4958
- name: CMake Configure
5059
if: ${{ ! inputs.arch }}
51-
run: cmake --preset ${{ inputs.preset-name }} --fresh -DCMAKE_BUILD_TYPE=${{ inputs.build-type }}
60+
run: cmake --preset ${{ inputs.preset-name }}-${{ inputs.os }} --fresh -DCMAKE_BUILD_TYPE=${{ inputs.build-type }}
5261
shell: pwsh
5362

5463
- name: CMake Configure Cross-Compile ${{ inputs.arch }}
5564
if: ${{ inputs.arch }}
56-
run: cmake --preset ${{ inputs.preset-name }} --fresh -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DNETREMOTE_EXCLUDE_TESTS=TRUE -A ${{ inputs.arch }}
65+
run: cmake --preset ${{ inputs.preset-name }}-${{ inputs.os }} --fresh -DCMAKE_BUILD_TYPE=${{ inputs.build-type }} -DNETREMOTE_EXCLUDE_TESTS=TRUE -A ${{ inputs.arch }}
5766
shell: pwsh
5867

5968
- name: CMake Build
60-
run: cmake --build --preset build-${{ inputs.preset-name }} --config ${{ inputs.build-type }}
69+
run: cmake --build --preset build-${{ inputs.preset-name }}-${{ inputs.os }} --config ${{ inputs.build-type }}
6170
shell: pwsh
6271

6372
- name: CMake Test (ctest)
6473
if: ${{ inputs.test == 'true' && ! inputs.arch }}
65-
run: ctest --preset ${{ inputs.preset-name }} -C ${{ inputs.build-type }}
74+
run: ctest --preset test-${{ inputs.preset-name }}-${{ inputs.os }} -C ${{ inputs.build-type }}
6675
shell: pwsh
6776

6877
- name: CMake Install
6978
if: inputs.install == 'true'
70-
run: cmake --build --preset build-${{ inputs.preset-name }} --target install --config ${{ inputs.build-type }}
79+
run: cmake --build --preset build-${{ inputs.preset-name }}-${{ inputs.os }} --target install --config ${{ inputs.build-type }}
7180
shell: pwsh
7281

7382
- name: CMake Package (cpack)
7483
if: inputs.package == 'true'
75-
run: cpack --preset package-${{ inputs.preset-name }} -C ${{ inputs.build-type }}
84+
run: cpack --preset packaging-${{ inputs.preset-name }}-${{ inputs.os }} -C ${{ inputs.build-type }}
7685
shell: pwsh
7786

7887
- name: Publish Artifacts
@@ -81,5 +90,5 @@ runs:
8190
with:
8291
name: release-package-${{ runner.os }}-${{ inputs.build-type }}-${{ inputs.arch != '' && inputs.arch || runner.arch }}
8392
path: |
84-
${{ github.workspace }}/out/package/${{ inputs.preset-name }}/*.tar.*
85-
${{ github.workspace }}/out/package/${{ inputs.preset-name }}/*.zip
93+
${{ github.workspace }}/out/package/${{ inputs.preset-name }}-${{ inputs.os }}/*.tar.*
94+
${{ github.workspace }}/out/package/${{ inputs.preset-name }}-${{ inputs.os }}/*.zip

.github/workflows/build-linux.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)