-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Developing for Azure Linux easily (#6810)
Co-authored-by: Amaury Chamayou <[email protected]> Co-authored-by: Amaury Chamayou <[email protected]>
- Loading branch information
1 parent
4c389ed
commit 8b274d4
Showing
10 changed files
with
113 additions
and
72 deletions.
There are no files selected for viewing
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,12 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the Apache 2.0 License. | ||
|
||
ARG BASE_IMAGE=mcr.microsoft.com/azurelinux/base/core:3.0 | ||
FROM ${BASE_IMAGE} | ||
|
||
# Trust Microsoft-signed packages | ||
RUN gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY \ | ||
&& tdnf -y update | ||
|
||
# Basic dev deps, helps smoothly install VSCode server. | ||
RUN tdnf -y install build-essential |
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 |
---|---|---|
@@ -1,31 +1,35 @@ | ||
{ | ||
"name": "CCF Development Environment", | ||
"image": "ghcr.io/microsoft/ccf/ci/default:latest", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": "." | ||
}, | ||
"runArgs": [], | ||
"extensions": [ | ||
"eamodio.gitlens", | ||
"esbenp.prettier-vscode", | ||
"me-dutour-mathieu.vscode-github-actions", | ||
"ms-azure-devops.azure-pipelines", | ||
"ms-python.black-formatter", | ||
"ms-python.python", | ||
"ms-vscode.cpptools" | ||
], | ||
"settings": { | ||
"python.defaultInterpreterPath": "python3", | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"eamodio.gitlens", | ||
"waderyan.gitblame", | ||
"esbenp.prettier-vscode", | ||
"github.vscode-github-actions", | ||
"ms-python.black-formatter", | ||
"ms-python.python", | ||
"ms-vscode.cpptools", | ||
"github.copilot" | ||
] | ||
}, | ||
"python.formatting.provider": "none", | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
"settings": { | ||
"python.defaultInterpreterPath": "python3", | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter" | ||
}, | ||
"python.formatting.provider": "none", | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
} | ||
} | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-from-docker:1": { | ||
"version": "latest" | ||
} | ||
} | ||
"postCreateCommand": "./.devcontainer/post_create_setup.sh" | ||
} |
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,10 @@ | ||
#!/bin/bash | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the Apache 2.0 License. | ||
|
||
set -ex | ||
|
||
./scripts/setup-ci.sh | ||
./scripts/setup-dev.sh | ||
|
||
git config --global --add safe.directory /workspaces/CCF |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the Apache 2.0 License. | ||
|
||
set -ex | ||
H2SPEC_VERSION="v2.6.0" | ||
|
||
# Source control | ||
tdnf -y install \ | ||
git \ | ||
ca-certificates | ||
|
||
# To build CCF | ||
tdnf -y install \ | ||
build-essential \ | ||
clang \ | ||
cmake \ | ||
ninja-build \ | ||
which \ | ||
openssl-devel \ | ||
libuv-devel \ | ||
nghttp2-devel \ | ||
curl-devel \ | ||
libarrow-devel \ | ||
parquet-libs-devel | ||
|
||
# To run standard tests | ||
tdnf -y install \ | ||
lldb \ | ||
expect \ | ||
npm \ | ||
jq | ||
|
||
# Extra-dependency for CDDL schema checker | ||
tdnf -y install rubygems | ||
gem install cddl | ||
|
||
# Release (extended) tests | ||
tdnf -y install procps | ||
|
||
# protocoltest | ||
tdnf install -y bind-utils | ||
curl -L --output h2spec_linux_amd64.tar.gz https://github.com/summerwind/h2spec/releases/download/$H2SPEC_VERSION/h2spec_linux_amd64.tar.gz | ||
tar -xvf h2spec_linux_amd64.tar.gz | ||
mkdir /opt/h2spec | ||
mv h2spec /opt/h2spec/h2spec | ||
rm h2spec_linux_amd64.tar.gz | ||
|
||
# For packaging | ||
tdnf -y install rpm-build |
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,8 @@ | ||
#!/bin/bash | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the Apache 2.0 License. | ||
|
||
set -ex | ||
|
||
tdnf -y install \ | ||
vim |