Skip to content

Commit

Permalink
Deps management improv
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtropets committed Feb 6, 2025
1 parent 6193a7c commit c3a51a3
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 58 deletions.
12 changes: 12 additions & 0 deletions .devcontainer/Dockerfile
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}

# ?
RUN gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY \
&& tdnf -y update

# VSCode server dependency
RUN tdnf -y install awk
52 changes: 28 additions & 24 deletions .devcontainer/devcontainer.json
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"
}
11 changes: 11 additions & 0 deletions .devcontainer/post_create_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.

set -ex

./scripts/setup-ci-basic.sh
./scripts/setup-ci-full.sh
./scripts/setup-dev.sh

git config --global --add safe.directory /workspaces/CCF
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
shell: bash
run: |
set -ex
./scripts/install-azure-linux-deps.sh
./scripts/setup-ci-basic.sh
- name: "Build Debug"
run: |
Expand All @@ -148,5 +148,5 @@ jobs:
# Unit tests
./tests.sh --output-on-failure -L unit -j$(nproc --all)
# All other acceptably fast tests, which are now supported on Mariner.
./tests.sh --timeout 360 --output-on-failure -LE "benchmark|protocolstest|suite|unit|lts_compatibility"
./tests.sh --timeout 360 --output-on-failure -LE "benchmark|suite|unit|lts"
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/long-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ jobs:
shell: bash
run: |
set -ex
./scripts/install-azure-linux-deps.sh
./scripts/setup-ci-basic.sh
- name: "Build Debug (Long Test)"
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,8 @@ jobs:
shell: bash
run: |
set -ex
./scripts/install-azure-linux-deps.sh
./scripts/install-azure-linux-extended.sh
# For packaging and release tests
tdnf -y install rpm-build
./scripts/setup-ci-basic.sh
./scripts/setup-ci-full.sh
- name: "Build Release ${{ matrix.platform.name }}"
shell: bash
Expand Down
24 changes: 0 additions & 24 deletions scripts/install-azure-linux-deps.sh

This file was deleted.

Empty file.
35 changes: 35 additions & 0 deletions scripts/setup-ci-basic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.

set -ex

# 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
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ set -ex

H2SPEC_VERSION="v2.6.0"

# protocoltest dependency
tdnf install -y bind-utils
# Release (extended) tests
tdnf -y install procps

# protocoltest dependency
# 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
9 changes: 9 additions & 0 deletions scripts/setup-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.

set -ex

tdnf -y install \
vim \
shellcheck

0 comments on commit c3a51a3

Please sign in to comment.