From aa04fddde7dcf756c1a3ff2e034c90817a865602 Mon Sep 17 00:00:00 2001 From: Jamie Cui Date: Wed, 30 Oct 2024 20:43:23 +0800 Subject: [PATCH] chore(build): remote redundant files --- .circleci/config.yml | 48 ---------- .circleci/continue-config.yml | 103 ---------------------- .github/workflows/buildifier.yml | 7 +- .github/workflows/cla.yml | 27 ------ .github/workflows/clang-format-linter.yml | 10 ++- .github/workflows/license-check.yml | 7 +- .github/workflows/scorecard.yml | 86 ------------------ .github/workflows/stale.yml | 26 ------ README.md | 1 - 9 files changed, 21 insertions(+), 294 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .circleci/continue-config.yml delete mode 100644 .github/workflows/cla.yml delete mode 100644 .github/workflows/scorecard.yml delete mode 100644 .github/workflows/stale.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index acf8f63..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2023 Ant Group Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://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. - -version: 2.1 - -parameters: - GHA_Event: - type: string - default: "" - GHA_Actor: - type: string - default: "" - GHA_Action: - type: string - default: "" - GHA_Meta: - type: string - default: "" - -setup: true - -orbs: - path-filtering: circleci/path-filtering@1.1.0 - -workflows: - unittest-workflow: - jobs: - - path-filtering/filter: - base-revision: main - config-path: .circleci/continue-config.yml - mapping: | - yacl/.* build-and-run true - bazel/.* build-and-run true - .bazelrc build-and-run true - .bazelversion build-and-run true - .circleci/.* build-and-run true - WORKSPACE build-and-run true diff --git a/.circleci/continue-config.yml b/.circleci/continue-config.yml deleted file mode 100644 index 466d9d8..0000000 --- a/.circleci/continue-config.yml +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2023 Ant Group Co., Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://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. - -# Use the latest 2.1 version of CircleCI pipeline process engine. -# See: https://circleci.com/docs/2.0/configuration-reference -version: 2.1 - -parameters: - GHA_Event: - type: string - default: "" - GHA_Actor: - type: string - default: "" - GHA_Action: - type: string - default: "" - GHA_Meta: - type: string - default: "" - build-and-run: - type: boolean - default: false - -commands: - build_and_test: - steps: - - run: - name: Checkout devtools - command: git clone https://github.com/secretflow/devtools.git ../devtools - - run: - name: Setup GCS - command: | - echo ${gcs_content} > ../gcs.data - ../devtools/bazel_cache_setup.py --in_file=../gcs.data --out_file=../gcs.json --min_download - - run: - name: "build and test" - command: | - set +e - declare -i test_status - bazel test //yacl/... -c opt --ui_event_filters=-info,-debug,-warning --test_output=errors --jobs 16 | tee test_result.log; test_status=${PIPESTATUS[0]} - - git clone https://github.com/secretflow/devtools.git - sh devtools/rename-junit-xml.sh - - find bazel-testlogs/ -type f -name "test.log" -print0 | xargs -0 tar -cvzf test_logs.tar.gz - exit ${test_status} - - store_test_results: - path: test-results - - store_artifacts: - path: test_logs.tar.gz - -# Define a job to be invoked later in a workflow. -# See: https://circleci.com/docs/2.0/configuration-reference/#jobs -jobs: - linux_ut: - # Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. - # See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor - docker: - - image: secretflow/ubuntu-base-ci:latest - parameters: - resource_class: - type: string - resource_class: << parameters.resource_class >> - # Add steps to the job - # See: https://circleci.com/docs/2.0/configuration-reference/#steps - steps: - - checkout - - build_and_test - macOS_ut_arm64: - macos: - xcode: 16.0.0 - resource_class: macos.m1.medium.gen1 - steps: - - checkout - - run: - name: "Install homebrew dependencies" - command: | - brew install bazelisk cmake ninja libomp wget md5sha1sum - - build_and_test - -# Invoke jobs via workflows -# See: https://circleci.com/docs/2.0/configuration-reference/#workflows -workflows: - unittest: - when: << pipeline.parameters.build-and-run >> - jobs: - - linux_ut: - matrix: - parameters: - resource_class: ["2xlarge", "arm-xlarge"] - - macOS_ut_arm64 diff --git a/.github/workflows/buildifier.yml b/.github/workflows/buildifier.yml index 313f1c1..59bbd6b 100644 --- a/.github/workflows/buildifier.yml +++ b/.github/workflows/buildifier.yml @@ -25,4 +25,9 @@ permissions: contents: read jobs: bazel-formatting-check: - uses: secretflow/.github/.github/workflows/bazel-linter.yml@main + name: Run buildifier check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run buildifier + uses: jbajic/buildifier@v1 diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml deleted file mode 100644 index 5bc6898..0000000 --- a/.github/workflows/cla.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2024 Ant Group Co., Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://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. - ---- -name: CLA Assistant -on: - issue_comment: - types: [created] - pull_request_target: - types: [opened, closed, synchronize] -permissions: - pull-requests: write -jobs: - CLAssistant: - uses: secretflow/.github/.github/workflows/cla.yml@main - secrets: inherit diff --git a/.github/workflows/clang-format-linter.yml b/.github/workflows/clang-format-linter.yml index ded293c..dfb8707 100644 --- a/.github/workflows/clang-format-linter.yml +++ b/.github/workflows/clang-format-linter.yml @@ -25,4 +25,12 @@ permissions: contents: read jobs: run-clang-format: - uses: secretflow/.github/.github/workflows/clang-format.yml@main + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.2.0 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: jidicula/clang-format-action@v4.13.0 # latest + with: + clang-format-version: '18' diff --git a/.github/workflows/license-check.yml b/.github/workflows/license-check.yml index bec9234..7de7a45 100644 --- a/.github/workflows/license-check.yml +++ b/.github/workflows/license-check.yml @@ -11,4 +11,9 @@ permissions: contents: read jobs: license-checker: - uses: secretflow/.github/.github/workflows/license-check.yml@main + name: Run license check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check License Header + uses: apache/skywalking-eyes/header@v0.6.0 diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml deleted file mode 100644 index 35e4c9d..0000000 --- a/.github/workflows/scorecard.yml +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 2024 Ant Group Co., Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://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. - -# This workflow uses actions that are not certified by GitHub. They are provided -# by a third-party and are governed by separate terms of service, privacy -# policy, and support documentation. - -name: Scorecard supply-chain security -on: - # For Branch-Protection check. Only the default branch is supported. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection - branch_protection_rule: - # To guarantee Maintained check is occasionally updated. See - # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained - schedule: - - cron: '44 6 * * 2' - push: - branches: [ "main" ] - -# Declare default permissions as read only. -permissions: read-all - -jobs: - analysis: - name: Scorecard analysis - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - # Needed to publish results and get a badge (see publish_results below). - id-token: write - # Uncomment the permissions below if installing in a private repository. - # contents: read - # actions: read - - steps: - - name: "Checkout code" - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 - with: - results_file: results.sarif - results_format: sarif - # (Optional) "write" PAT token. Uncomment the `repo_token` line below if: - # - you want to enable the Branch-Protection check on a *public* repository, or - # - you are installing Scorecard on a *private* repository - # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. - # repo_token: ${{ secrets.SCORECARD_TOKEN }} - - # Public repositories: - # - Publish results to OpenSSF REST API for easy access by consumers - # - Allows the repository to include the Scorecard badge. - # - See https://github.com/ossf/scorecard-action#publishing-results. - # For private repositories: - # - `publish_results` will always be set to `false`, regardless - # of the value entered here. - publish_results: true - - # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF - # format to the repository Actions tab. - # - name: "Upload artifact" - # uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0 - # with: - # name: SARIF file - # path: results.sarif - # retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12 - with: - sarif_file: results.sarif diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index c5341d2..0000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2024 Ant Group Co., Ltd -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://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. - ---- -name: Mark stale issues and pull requests -on: - workflow_dispatch: - schedule: - - cron: 40 9 * * * -permissions: - pull-requests: write - issues: write -jobs: - stale: - uses: secretflow/.github/.github/workflows/stale.yml@main diff --git a/README.md b/README.md index 09d286d..4525af5 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # YACL (Yet Another Common crypto Library) [![CircleCI](https://dl.circleci.com/status-badge/img/gh/secretflow/yacl/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/secretflow/yacl/tree/main) -[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/secretflow/yacl/badge)](https://securityscorecards.dev/viewer/?uri=github.com/secretflow/yacl) Yacl is a C++ library that contains common cryptgraphy, network and io modules which other SecretFlow code depends on. The crypto modules in Yacl implement many state-of-art secure computation protocols, including primitives like OT, VOLE, TPRE, and tools like PRG, RO. Check the full list of Yacl's supported algorithms in [ALGORITHMS.md](ALGORITHMS.md).