-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build-system, devcontainer setup, runtimes, and workflows (#113)
- Loading branch information
1 parent
a6ed187
commit 782cd03
Showing
28 changed files
with
325 additions
and
558 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
# This file is maintained by velocitas CLI, do not modify manually. Change settings in .velocitas.json | ||
# Copyright (c) 2023-2024 Contributors to the Eclipse Foundation | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://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. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if [ "${CODESPACES}" = "true" ]; then | ||
echo "#######################################################" | ||
echo "### Setup Access to Codespaces ###" | ||
echo "#######################################################" | ||
|
||
# restart Docker connection if in Codespaces | ||
# Workaround according to https://github.com/devcontainers/features/issues/671#issuecomment-1701754897 | ||
sudo pkill dockerd && sudo pkill containerd | ||
/usr/local/share/docker-init.sh | ||
|
||
# Remove the default credential helper | ||
sudo sed -i -E 's/helper =.*//' /etc/gitconfig | ||
|
||
# Add one that just uses secrets available in the Codespace | ||
git config --global credential.helper '!f() { sleep 1; echo "username=${GITHUB_USER}"; echo "password=${MY_GH_TOKEN}"; }; f' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
# This file is maintained by velocitas CLI, do not modify manually. Change settings in .velocitas.json | ||
# Copyright (c) 2022-2024 Contributors to the Eclipse Foundation | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://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. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
echo "#######################################################" | ||
echo "### Install Prerequisites and Tools ###" | ||
echo "#######################################################" | ||
|
||
if [[ -z "${VELOCITAS_OFFLINE}" ]]; then | ||
# Optionally install the cmake for vcpkg | ||
.devcontainer/scripts/reinstall-cmake.sh ${REINSTALL_CMAKE_VERSION_FROM_SOURCE} | ||
|
||
# Install python, conan and ccache | ||
sudo apt-get update | ||
sudo apt-get install -y python3 | ||
sudo apt-get install -y python3-distutils | ||
curl -fsSL https://bootstrap.pypa.io/get-pip.py | sudo python3 | ||
sudo apt-get -y install --no-install-recommends ccache | ||
|
||
build_arch=$(arch) | ||
|
||
# ensure we can always build for an arm target | ||
if [ "${build_arch}" != "aarch64" ]; then | ||
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | ||
fi | ||
|
||
pip3 install -r ./requirements.txt | ||
|
||
# Install static analyzer tools | ||
sudo apt-get install -y cppcheck clang-format-14 clang-tidy-14 | ||
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 100 | ||
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 100 | ||
fi | ||
|
||
echo "#######################################################" | ||
echo "### Install Dependencies ###" | ||
echo "#######################################################" | ||
velocitas exec build-system install 2>&1 | tee -a $HOME/install_dependencies.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
# This file is maintained by velocitas CLI, do not modify manually. Change settings in .velocitas.json | ||
# Copyright (c) 2022-2024 Contributors to the Eclipse Foundation | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://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. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
echo "#######################################################" | ||
echo "### Setup Git ###" | ||
echo "#######################################################" | ||
# Add git name and email from env variables | ||
if [[ -n "${GIT_CONFIG_NAME}" && -n "${GIT_CONFIG_EMAIL}" ]]; then | ||
git config --global user.name $GIT_CONFIG_NAME | ||
git config --global user.email $GIT_CONFIG_EMAIL | ||
fi | ||
|
||
git config --global --add safe.directory "*" |
Oops, something went wrong.