diff --git a/.devcontainer/swift/Dockerfile b/.devcontainer/swift/Dockerfile deleted file mode 100644 index dddf18e1f87c..000000000000 --- a/.devcontainer/swift/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.236.0/containers/cpp/.devcontainer/base.Dockerfile - -# [Choice] Debian / Ubuntu version (use Debian 11, Ubuntu 18.04/22.04 on local arm64/Apple Silicon): debian-11, debian-10, ubuntu-22.04, ubuntu-24.04, ubuntu-20.04, ubuntu-18.04 -FROM mcr.microsoft.com/vscode/devcontainers/cpp:0-ubuntu-24.04 - -USER root -ADD root.sh /tmp/root.sh -ADD update-codeql.sh /usr/local/bin/update-codeql -RUN bash /tmp/root.sh && rm /tmp/root.sh diff --git a/.devcontainer/swift/devcontainer.json b/.devcontainer/swift/devcontainer.json deleted file mode 100644 index 97cd1bd022a2..000000000000 --- a/.devcontainer/swift/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "extensions": [ - "github.vscode-codeql", - "hbenl.vscode-test-explorer", - "ms-vscode.test-adapter-converter", - "slevesque.vscode-zipexplorer", - "ms-vscode.cpptools" - ], - "settings": { - "files.watcherExclude": { - "**/target/**": true - }, - "codeQL.runningQueries.memory": 2048 - }, - "build": { - "dockerfile": "Dockerfile", - }, - "runArgs": [ - "--cap-add=SYS_PTRACE", - "--security-opt", - "seccomp=unconfined" - ], - "remoteUser": "vscode", - "onCreateCommand": ".devcontainer/swift/user.sh" -} diff --git a/.devcontainer/swift/root.sh b/.devcontainer/swift/root.sh deleted file mode 100755 index 33ffba0a741c..000000000000 --- a/.devcontainer/swift/root.sh +++ /dev/null @@ -1,34 +0,0 @@ -set -xe - -BAZELISK_VERSION=v1.12.0 -BAZELISK_DOWNLOAD_SHA=6b0bcb2ea15bca16fffabe6fda75803440375354c085480fe361d2cbf32501db - -# install git lfs apt source -curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash - -# install gh apt source -(type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) \ -&& sudo mkdir -p -m 755 /etc/apt/keyrings \ -&& wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null \ -&& sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \ -&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ - -apt-get update -export DEBIAN_FRONTEND=noninteractive -apt-get -y install --no-install-recommends \ - zlib1g-dev \ - uuid-dev \ - python3-distutils \ - python3-pip \ - bash-completion \ - git-lfs \ - gh - -# Install Bazel -curl -fSsL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-linux-amd64 -echo "${BAZELISK_DOWNLOAD_SHA} */usr/local/bin/bazelisk" | sha256sum --check - -chmod 0755 /usr/local/bin/bazelisk -ln -s bazelisk /usr/local/bin/bazel - -# install latest codeql -update-codeql diff --git a/.devcontainer/swift/update-codeql.sh b/.devcontainer/swift/update-codeql.sh deleted file mode 100755 index 51fd7a612d36..000000000000 --- a/.devcontainer/swift/update-codeql.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -e - -URL=https://github.com/github/codeql-cli-binaries/releases -LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' $URL/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') -CURRENT_VERSION=v$(codeql version 2>/dev/null | sed -ne 's/.*release \([0-9.]*\)\./\1/p') -if [[ $CURRENT_VERSION != $LATEST_VERSION ]]; then - if [[ $UID != 0 ]]; then - echo "update required, please run this script with sudo:" - echo " sudo $0" - exit 1 - fi - ZIP=$(mktemp codeql.XXXX.zip) - curl -fSqL -o $ZIP $URL/download/$LATEST_VERSION/codeql-linux64.zip - unzip -q $ZIP -d /opt - rm $ZIP - ln -sf /opt/codeql/codeql /usr/local/bin/codeql - echo installed version $LATEST_VERSION -else - echo current version $CURRENT_VERSION is up-to-date -fi diff --git a/.devcontainer/swift/user.sh b/.devcontainer/swift/user.sh deleted file mode 100755 index 1de3485a723b..000000000000 --- a/.devcontainer/swift/user.sh +++ /dev/null @@ -1,15 +0,0 @@ -set -xe - -git lfs install - -# add the workspace to the codeql search path -mkdir -p /home/vscode/.config/codeql -echo "--search-path /workspaces/codeql" > /home/vscode/.config/codeql/config - -# create a swift extractor pack with the current state -cd /workspaces/codeql -bazel run swift/create-extractor-pack - -#install and set up pre-commit -python3 -m pip install pre-commit --no-warn-script-location -$HOME/.local/bin/pre-commit install