content stringlengths 1 103k β | path stringlengths 8 216 | filename stringlengths 2 179 | language stringclasses 15
values | size_bytes int64 2 189k | quality_score float64 0.5 0.95 | complexity float64 0 1 | documentation_ratio float64 0 1 | repository stringclasses 5
values | stars int64 0 1k | created_date stringdate 2023-07-10 19:21:08 2025-07-09 19:11:45 | license stringclasses 4
values | is_test bool 2
classes | file_hash stringlengths 32 32 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name: Periodic pagebench performance test on dedicated EC2 machine in eu-central-1 region\n\non:\n schedule:\n # * is a special character in YAML so you have to quote this string\n # ββββββββββββββ minute (0 - 59)\n # β ββββββββββββββ hour (0 - 23)\n # β β ββββββββββββββ day of the month (1 - 31)\n # β β β ββββββββββββββ month (1 - 12 or JAN-DEC)\n # β β β β ββββββββββββββ day of the week (0 - 6 or SUN-SAT)\n - cron: '0 */3 * * *' # Runs every 3 hours\n workflow_dispatch: # Allows manual triggering of the workflow\n inputs:\n commit_hash:\n type: string\n description: 'The long neon repo commit hash for the system under test (pageserver) to be tested.'\n required: false\n default: ''\n\ndefaults:\n run:\n shell: bash -euo pipefail {0}\n\nconcurrency:\n group: ${{ github.workflow }}\n cancel-in-progress: false\n\npermissions:\n contents: read\n\njobs:\n trigger_bench_on_ec2_machine_in_eu_central_1:\n permissions:\n id-token: write # aws-actions/configure-aws-credentials\n statuses: write\n contents: write\n pull-requests: write\n runs-on: [ self-hosted, small ]\n container:\n image: ghcr.io/neondatabase/build-tools:pinned-bookworm\n credentials:\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n options: --init\n timeout-minutes: 360 # Set the timeout to 6 hours\n env:\n API_KEY: ${{ secrets.PERIODIC_PAGEBENCH_EC2_RUNNER_API_KEY }}\n RUN_ID: ${{ github.run_id }}\n AWS_DEFAULT_REGION : "eu-central-1"\n AWS_INSTANCE_ID : "i-02a59a3bf86bc7e74"\n steps:\n # we don't need the neon source code because we run everything remotely\n # however we still need the local github actions to run the allure step below\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n - name: Show my own (github runner) external IP address - usefull for IP allowlisting\n run: curl https://ifconfig.me\n\n - name: Assume AWS OIDC role that allows to manage (start/stop/describe... EC machine)\n uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2\n with:\n aws-region: eu-central-1\n role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_MANAGE_BENCHMARK_EC2_VMS_ARN }}\n role-duration-seconds: 3600\n\n - name: Start EC2 instance and wait for the instance to boot up\n run: |\n aws ec2 start-instances --instance-ids $AWS_INSTANCE_ID\n aws ec2 wait instance-running --instance-ids $AWS_INSTANCE_ID\n sleep 60 # sleep some time to allow cloudinit and our API server to start up\n\n - name: Determine public IP of the EC2 instance and set env variable EC2_MACHINE_URL_US\n run: |\n public_ip=$(aws ec2 describe-instances --instance-ids $AWS_INSTANCE_ID --query 'Reservations[*].Instances[*].PublicIpAddress' --output text)\n echo "Public IP of the EC2 instance: $public_ip"\n echo "EC2_MACHINE_URL_US=https://${public_ip}:8443" >> $GITHUB_ENV\n\n - name: Determine commit hash\n env:\n INPUT_COMMIT_HASH: ${{ github.event.inputs.commit_hash }}\n run: |\n if [ -z "$INPUT_COMMIT_HASH" ]; then\n echo "COMMIT_HASH=$(curl -s https://api.github.com/repos/neondatabase/neon/commits/main | jq -r '.sha')" >> $GITHUB_ENV\n echo "COMMIT_HASH_TYPE=latest" >> $GITHUB_ENV\n else\n echo "COMMIT_HASH=$INPUT_COMMIT_HASH" >> $GITHUB_ENV\n echo "COMMIT_HASH_TYPE=manual" >> $GITHUB_ENV\n fi\n\n - name: Start Bench with run_id\n run: |\n curl -k -X 'POST' \\n "${EC2_MACHINE_URL_US}/start_test/${GITHUB_RUN_ID}" \\n -H 'accept: application/json' \\n -H 'Content-Type: application/json' \\n -H "Authorization: Bearer $API_KEY" \\n -d "{\"neonRepoCommitHash\": \"${COMMIT_HASH}\", \"neonRepoCommitHashType\": \"${COMMIT_HASH_TYPE}\"}"\n\n - name: Poll Test Status\n id: poll_step\n run: |\n status=""\n while [[ "$status" != "failure" && "$status" != "success" ]]; do\n response=$(curl -k -X 'GET' \\n "${EC2_MACHINE_URL_US}/test_status/${GITHUB_RUN_ID}" \\n -H 'accept: application/json' \\n -H "Authorization: Bearer $API_KEY")\n echo "Response: $response"\n set +x\n status=$(echo $response | jq -r '.status')\n echo "Test status: $status"\n if [[ "$status" == "failure" ]]; then\n echo "Test failed"\n exit 1 # Fail the job step if status is failure\n elif [[ "$status" == "success" || "$status" == "null" ]]; then\n break\n elif [[ "$status" == "too_many_runs" ]]; then\n echo "Too many runs already running"\n echo "too_many_runs=true" >> "$GITHUB_OUTPUT"\n exit 1\n fi\n\n sleep 60 # Poll every 60 seconds\n done\n\n - name: Retrieve Test Logs\n if: always() && steps.poll_step.outputs.too_many_runs != 'true'\n run: |\n curl -k -X 'GET' \\n "${EC2_MACHINE_URL_US}/test_log/${GITHUB_RUN_ID}" \\n -H 'accept: application/gzip' \\n -H "Authorization: Bearer $API_KEY" \\n --output "test_log_${GITHUB_RUN_ID}.gz"\n\n - name: Unzip Test Log and Print it into this job's log\n if: always() && steps.poll_step.outputs.too_many_runs != 'true'\n run: |\n gzip -d "test_log_${GITHUB_RUN_ID}.gz"\n cat "test_log_${GITHUB_RUN_ID}"\n\n - name: Create Allure report\n if: ${{ !cancelled() }}\n uses: ./.github/actions/allure-report-generate\n with:\n aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}\n\n - name: Post to a Slack channel\n if: ${{ github.event.schedule && failure() }}\n uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1\n with:\n channel-id: "C06KHQVQ7U3" # on-call-qa-staging-stream\n slack-message: "Periodic pagebench testing on dedicated hardware: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"\n env:\n SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}\n\n - name: Cleanup Test Resources\n if: always()\n run: |\n curl -k -X 'POST' \\n "${EC2_MACHINE_URL_US}/cleanup_test/${GITHUB_RUN_ID}" \\n -H 'accept: application/json' \\n -H "Authorization: Bearer $API_KEY" \\n -d ''\n\n - name: Assume AWS OIDC role that allows to manage (start/stop/describe... EC machine)\n if: always() && steps.poll_step.outputs.too_many_runs != 'true'\n uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2\n with:\n aws-region: eu-central-1\n role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_MANAGE_BENCHMARK_EC2_VMS_ARN }}\n role-duration-seconds: 3600\n\n - name: Stop EC2 instance and wait for the instance to be stopped\n if: always() && steps.poll_step.outputs.too_many_runs != 'true'\n run: |\n aws ec2 stop-instances --instance-ids $AWS_INSTANCE_ID\n aws ec2 wait instance-stopped --instance-ids $AWS_INSTANCE_ID\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\periodic_pagebench.yml | periodic_pagebench.yml | YAML | 7,489 | 0.95 | 0.082418 | 0.049689 | awesome-app | 179 | 2025-01-10T11:21:55.460518 | BSD-3-Clause | false | bc195108d956b128dcaf600403384dbb |
name: Test Postgres client libraries\n\non:\n schedule:\n # * is a special character in YAML so you have to quote this string\n # ββββββββββββββ minute (0 - 59)\n # β ββββββββββββββ hour (0 - 23)\n # β β ββββββββββββββ day of the month (1 - 31)\n # β β β ββββββββββββββ month (1 - 12 or JAN-DEC)\n # β β β β ββββββββββββββ day of the week (0 - 6 or SUN-SAT)\n - cron: '23 02 * * *' # run once a day, timezone is utc\n pull_request:\n paths:\n - '.github/workflows/pg-clients.yml'\n - 'test_runner/pg_clients/**/*.py'\n - 'test_runner/logical_repl/**/*.py'\n - 'poetry.lock'\n workflow_dispatch:\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.ref_name }}\n cancel-in-progress: ${{ github.event_name == 'pull_request' }}\n\ndefaults:\n run:\n shell: bash -euxo pipefail {0}\n\npermissions:\n id-token: write # aws-actions/configure-aws-credentials\n statuses: write # require for posting a status update\n\nenv:\n DEFAULT_PG_VERSION: 17\n PLATFORM: neon-captest-new\n AWS_DEFAULT_REGION: eu-central-1\n\njobs:\n check-permissions:\n if: ${{ !contains(github.event.pull_request.labels.*.name, 'run-no-ci') }}\n uses: ./.github/workflows/check-permissions.yml\n with:\n github-event-name: ${{ github.event_name }}\n\n build-build-tools-image:\n permissions:\n packages: write\n needs: [ check-permissions ]\n uses: ./.github/workflows/build-build-tools-image.yml\n secrets: inherit\n\n test-logical-replication:\n needs: [ build-build-tools-image ]\n runs-on: ubuntu-22.04\n\n container:\n image: ${{ needs.build-build-tools-image.outputs.image }}-bookworm\n credentials:\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n options: --init --user root\n services:\n clickhouse:\n image: clickhouse/clickhouse-server:24.6.3.64\n ports:\n - 9000:9000\n - 8123:8123\n zookeeper:\n image: quay.io/debezium/zookeeper:2.7\n ports:\n - 2181:2181\n kafka:\n image: quay.io/debezium/kafka:2.7\n env:\n ZOOKEEPER_CONNECT: "zookeeper:2181"\n KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092\n KAFKA_BROKER_ID: 1\n KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1\n KAFKA_JMX_PORT: 9991\n ports:\n - 9092:9092\n debezium:\n image: quay.io/debezium/connect:2.7\n env:\n BOOTSTRAP_SERVERS: kafka:9092\n GROUP_ID: 1\n CONFIG_STORAGE_TOPIC: debezium-config\n OFFSET_STORAGE_TOPIC: debezium-offset\n STATUS_STORAGE_TOPIC: debezium-status\n DEBEZIUM_CONFIG_CONNECTOR_CLASS: io.debezium.connector.postgresql.PostgresConnector\n ports:\n - 8083:8083\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n - name: Download Neon artifact\n uses: ./.github/actions/download\n with:\n name: neon-${{ runner.os }}-${{ runner.arch }}-release-artifact\n path: /tmp/neon/\n prefix: latest\n aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}\n\n - name: Create Neon Project\n id: create-neon-project\n uses: ./.github/actions/neon-project-create\n with:\n api_key: ${{ secrets.NEON_STAGING_API_KEY }}\n postgres_version: ${{ env.DEFAULT_PG_VERSION }}\n project_settings: >-\n {"enable_logical_replication": true}\n\n - name: Run tests\n uses: ./.github/actions/run-python-test-set\n with:\n build_type: remote\n test_selection: logical_repl\n run_in_parallel: false\n extra_params: -m remote_cluster\n pg_version: ${{ env.DEFAULT_PG_VERSION }}\n aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}\n env:\n BENCHMARK_CONNSTR: ${{ steps.create-neon-project.outputs.dsn }}\n\n - name: Delete Neon Project\n if: always()\n uses: ./.github/actions/neon-project-delete\n with:\n project_id: ${{ steps.create-neon-project.outputs.project_id }}\n api_key: ${{ secrets.NEON_STAGING_API_KEY }}\n\n - name: Create Allure report\n if: ${{ !cancelled() }}\n id: create-allure-report\n uses: ./.github/actions/allure-report-generate\n with:\n store-test-results-into-db: true\n aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}\n env:\n REGRESS_TEST_RESULT_CONNSTR_NEW: ${{ secrets.REGRESS_TEST_RESULT_CONNSTR_NEW }}\n\n - name: Post to a Slack channel\n if: github.event.schedule && failure()\n uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1\n with:\n channel-id: "C06KHQVQ7U3" # on-call-qa-staging-stream\n slack-message: |\n Testing the logical replication: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ job.status }}> (<${{ steps.create-allure-report.outputs.report-url }}|test report>)\n env:\n SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}\n\n test-postgres-client-libs:\n needs: [ build-build-tools-image ]\n runs-on: ubuntu-22.04\n\n container:\n image: ${{ needs.build-build-tools-image.outputs.image }}-bookworm\n credentials:\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n options: --init --user root\n\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n - name: Download Neon artifact\n uses: ./.github/actions/download\n with:\n name: neon-${{ runner.os }}-${{ runner.arch }}-release-artifact\n path: /tmp/neon/\n prefix: latest\n aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}\n\n - name: Create Neon Project\n id: create-neon-project\n uses: ./.github/actions/neon-project-create\n with:\n api_key: ${{ secrets.NEON_STAGING_API_KEY }}\n postgres_version: ${{ env.DEFAULT_PG_VERSION }}\n\n - name: Run tests\n uses: ./.github/actions/run-python-test-set\n with:\n build_type: remote\n test_selection: pg_clients\n run_in_parallel: false\n extra_params: -m remote_cluster\n pg_version: ${{ env.DEFAULT_PG_VERSION }}\n aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}\n env:\n BENCHMARK_CONNSTR: ${{ steps.create-neon-project.outputs.dsn }}\n\n - name: Delete Neon Project\n if: always()\n uses: ./.github/actions/neon-project-delete\n with:\n project_id: ${{ steps.create-neon-project.outputs.project_id }}\n api_key: ${{ secrets.NEON_STAGING_API_KEY }}\n\n - name: Create Allure report\n if: ${{ !cancelled() }}\n id: create-allure-report\n uses: ./.github/actions/allure-report-generate\n with:\n store-test-results-into-db: true\n aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}\n env:\n REGRESS_TEST_RESULT_CONNSTR_NEW: ${{ secrets.REGRESS_TEST_RESULT_CONNSTR_NEW }}\n\n - name: Post to a Slack channel\n if: github.event.schedule && failure()\n uses: slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3 # v1.27.1\n with:\n channel-id: "C06KHQVQ7U3" # on-call-qa-staging-stream\n slack-message: |\n Testing Postgres clients: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ job.status }}> (<${{ steps.create-allure-report.outputs.report-url }}|test report>)\n env:\n SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\pg-clients.yml | pg-clients.yml | YAML | 8,141 | 0.95 | 0.035242 | 0.029851 | awesome-app | 528 | 2025-02-12T20:15:20.592770 | BSD-3-Clause | false | dfc32415150e498ebcd82fe9a766d61a |
name: 'Pin build-tools image'\n\non:\n workflow_dispatch:\n inputs:\n from-tag:\n description: 'Source tag'\n required: true\n type: string\n force:\n description: 'Force the image to be pinned'\n default: false\n type: boolean\n workflow_call:\n inputs:\n from-tag:\n description: 'Source tag'\n required: true\n type: string\n force:\n description: 'Force the image to be pinned'\n default: false\n type: boolean\n\ndefaults:\n run:\n shell: bash -euo pipefail {0}\n\nconcurrency:\n group: pin-build-tools-image-${{ inputs.from-tag }}\n cancel-in-progress: false\n\n# No permission for GITHUB_TOKEN by default; the **minimal required** set of permissions should be granted in each job.\npermissions: {}\n\njobs:\n check-manifests:\n runs-on: ubuntu-22.04\n outputs:\n skip: ${{ steps.check-manifests.outputs.skip }}\n\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@v2\n with:\n egress-policy: audit\n\n - name: Check if we really need to pin the image\n id: check-manifests\n env:\n FROM_TAG: ${{ inputs.from-tag }}\n TO_TAG: pinned\n run: |\n docker manifest inspect "ghcr.io/neondatabase/build-tools:${FROM_TAG}" > "${FROM_TAG}.json"\n docker manifest inspect "ghcr.io/neondatabase/build-tools:${TO_TAG}" > "${TO_TAG}.json"\n\n if diff "${FROM_TAG}.json" "${TO_TAG}.json"; then\n skip=true\n else\n skip=false\n fi\n\n echo "skip=${skip}" | tee -a $GITHUB_OUTPUT\n\n tag-image:\n needs: check-manifests\n\n # use format(..) to catch both inputs.force = true AND inputs.force = 'true'\n if: needs.check-manifests.outputs.skip == 'false' || format('{0}', inputs.force) == 'true'\n\n permissions:\n id-token: write # Required for aws/azure login\n packages: write # required for pushing to GHCR\n\n uses: ./.github/workflows/_push-to-container-registry.yml\n with:\n image-map: |\n {\n "ghcr.io/neondatabase/build-tools:${{ inputs.from-tag }}-bullseye": [\n "docker.io/neondatabase/build-tools:pinned-bullseye",\n "ghcr.io/neondatabase/build-tools:pinned-bullseye",\n "${{ vars.NEON_DEV_AWS_ACCOUNT_ID }}.dkr.ecr.${{ vars.AWS_ECR_REGION }}.amazonaws.com/build-tools:pinned-bullseye",\n "${{ vars.AZURE_DEV_REGISTRY_NAME }}.azurecr.io/neondatabase/build-tools:pinned-bullseye"\n ],\n "ghcr.io/neondatabase/build-tools:${{ inputs.from-tag }}-bookworm": [\n "docker.io/neondatabase/build-tools:pinned-bookworm",\n "docker.io/neondatabase/build-tools:pinned",\n "ghcr.io/neondatabase/build-tools:pinned-bookworm",\n "ghcr.io/neondatabase/build-tools:pinned",\n "${{ vars.NEON_DEV_AWS_ACCOUNT_ID }}.dkr.ecr.${{ vars.AWS_ECR_REGION }}.amazonaws.com/build-tools:pinned-bookworm",\n "${{ vars.NEON_DEV_AWS_ACCOUNT_ID }}.dkr.ecr.${{ vars.AWS_ECR_REGION }}.amazonaws.com/build-tools:pinned",\n "${{ vars.AZURE_DEV_REGISTRY_NAME }}.azurecr.io/neondatabase/build-tools:pinned-bookworm",\n "${{ vars.AZURE_DEV_REGISTRY_NAME }}.azurecr.io/neondatabase/build-tools:pinned"\n ]\n }\n aws-region: ${{ vars.AWS_ECR_REGION }}\n aws-account-id: "${{ vars.NEON_DEV_AWS_ACCOUNT_ID }}"\n aws-role-to-assume: "gha-oidc-neon-admin"\n azure-client-id: ${{ vars.AZURE_DEV_CLIENT_ID }}\n azure-subscription-id: ${{ vars.AZURE_DEV_SUBSCRIPTION_ID }}\n azure-tenant-id: ${{ vars.AZURE_TENANT_ID }}\n acr-registry-name: ${{ vars.AZURE_DEV_REGISTRY_NAME }}\n secrets: inherit\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\pin-build-tools-image.yml | pin-build-tools-image.yml | YAML | 3,735 | 0.95 | 0.067961 | 0.022222 | react-lib | 176 | 2024-02-15T11:03:52.481587 | Apache-2.0 | false | be222103f2fb3c62077ec0fb59d96ada |
name: Pre-merge checks\n\non:\n pull_request:\n paths:\n - .github/workflows/_check-codestyle-python.yml\n - .github/workflows/_check-codestyle-rust.yml\n - .github/workflows/build-build-tools-image.yml\n - .github/workflows/pre-merge-checks.yml\n merge_group:\n\ndefaults:\n run:\n shell: bash -euxo pipefail {0}\n\n# No permission for GITHUB_TOKEN by default; the **minimal required** set of permissions should be granted in each job.\npermissions: {}\n\njobs:\n meta:\n runs-on: ubuntu-22.04\n permissions:\n contents: read\n outputs:\n python-changed: ${{ steps.python-src.outputs.any_changed }}\n rust-changed: ${{ steps.rust-src.outputs.any_changed }}\n branch: ${{ steps.group-metadata.outputs.branch }}\n pr-number: ${{ steps.group-metadata.outputs.pr-number }}\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n - uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1\n id: python-src\n with:\n files: |\n .github/workflows/_check-codestyle-python.yml\n .github/workflows/build-build-tools-image.yml\n .github/workflows/pre-merge-checks.yml\n **/**.py\n poetry.lock\n pyproject.toml\n\n - uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1\n id: rust-src\n with:\n files: |\n .github/workflows/_check-codestyle-rust.yml\n .github/workflows/build-build-tools-image.yml\n .github/workflows/pre-merge-checks.yml\n **/**.rs\n **/Cargo.toml\n Cargo.toml\n Cargo.lock\n\n - name: PRINT ALL CHANGED FILES FOR DEBUG PURPOSES\n env:\n PYTHON_CHANGED_FILES: ${{ steps.python-src.outputs.all_changed_files }}\n RUST_CHANGED_FILES: ${{ steps.rust-src.outputs.all_changed_files }}\n run: |\n echo "${PYTHON_CHANGED_FILES}"\n echo "${RUST_CHANGED_FILES}"\n\n - name: Merge group metadata\n if: ${{ github.event_name == 'merge_group' }}\n id: group-metadata\n env:\n MERGE_QUEUE_REF: ${{ github.event.merge_group.head_ref }}\n run: |\n echo $MERGE_QUEUE_REF | jq -Rr 'capture("refs/heads/gh-readonly-queue/(?<branch>.*)/pr-(?<pr_number>[0-9]+)-[0-9a-f]{40}") | ["branch=" + .branch, "pr-number=" + .pr_number] | .[]' | tee -a "${GITHUB_OUTPUT}"\n\n build-build-tools-image:\n if: |\n false\n || needs.meta.outputs.python-changed == 'true'\n || needs.meta.outputs.rust-changed == 'true'\n needs: [ meta ]\n permissions:\n contents: read\n packages: write\n uses: ./.github/workflows/build-build-tools-image.yml\n with:\n # Build only one combination to save time\n archs: '["x64"]'\n debians: '["bookworm"]'\n secrets: inherit\n\n check-codestyle-python:\n if: needs.meta.outputs.python-changed == 'true'\n needs: [ meta, build-build-tools-image ]\n permissions:\n contents: read\n packages: read\n uses: ./.github/workflows/_check-codestyle-python.yml\n with:\n # `-bookworm-x64` suffix should match the combination in `build-build-tools-image`\n build-tools-image: ${{ needs.build-build-tools-image.outputs.image }}-bookworm-x64\n secrets: inherit\n\n check-codestyle-rust:\n if: needs.meta.outputs.rust-changed == 'true'\n needs: [ meta, build-build-tools-image ]\n permissions:\n contents: read\n packages: read\n uses: ./.github/workflows/_check-codestyle-rust.yml\n with:\n # `-bookworm-x64` suffix should match the combination in `build-build-tools-image`\n build-tools-image: ${{ needs.build-build-tools-image.outputs.image }}-bookworm-x64\n archs: '["x64"]'\n secrets: inherit\n\n # To get items from the merge queue merged into main we need to satisfy "Status checks that are required".\n # Currently we require 2 jobs (checks with exact name):\n # - conclusion\n # - neon-cloud-e2e\n conclusion:\n # Do not run job on Pull Requests as it interferes with the `conclusion` job from the `build_and_test` workflow\n if: always() && github.event_name == 'merge_group'\n permissions:\n statuses: write # for `github.repos.createCommitStatus(...)`\n contents: write\n needs:\n - meta\n - check-codestyle-python\n - check-codestyle-rust\n runs-on: ubuntu-22.04\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - name: Create fake `neon-cloud-e2e` check\n uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1\n with:\n # Retry script for 5XX server errors: https://github.com/actions/github-script#retries\n retries: 5\n script: |\n const { repo, owner } = context.repo;\n const targetUrl = `${context.serverUrl}/${owner}/${repo}/actions/runs/${context.runId}`;\n\n await github.rest.repos.createCommitStatus({\n owner: owner,\n repo: repo,\n sha: context.sha,\n context: `neon-cloud-e2e`,\n state: `success`,\n target_url: targetUrl,\n description: `fake check for merge queue`,\n });\n\n - name: Fail the job if any of the dependencies do not succeed or skipped\n run: exit 1\n if: |\n false\n || (github.event_name == 'merge_group' && needs.meta.outputs.branch != 'main')\n || (needs.check-codestyle-python.result == 'skipped' && needs.meta.outputs.python-changed == 'true')\n || (needs.check-codestyle-rust.result == 'skipped' && needs.meta.outputs.rust-changed == 'true')\n || contains(needs.*.result, 'failure')\n || contains(needs.*.result, 'cancelled')\n\n - name: Add fast-forward label to PR to trigger fast-forward merge\n if: >-\n ${{\n always()\n && github.event_name == 'merge_group'\n && contains(fromJSON('["release", "release-proxy", "release-compute"]'), needs.meta.outputs.branch)\n }}\n env:\n GH_TOKEN: ${{ secrets.CI_ACCESS_TOKEN }}\n run: >-\n gh pr edit ${{ needs.meta.outputs.pr-number }} --repo "${GITHUB_REPOSITORY}" --add-label "fast-forward"\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\pre-merge-checks.yml | pre-merge-checks.yml | YAML | 6,607 | 0.95 | 0.067797 | 0.08125 | python-kit | 887 | 2023-09-11T13:32:46.276275 | Apache-2.0 | false | ef6b5f92a4986080b85718333e528ea9 |
name: Regenerate Postgres Settings\n\non:\n pull_request:\n types:\n - opened\n - synchronize\n - reopened\n paths:\n - pgxn/neon/**.c\n - vendor/postgres-v*\n - vendor/revisions.json\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref }}\n cancel-in-progress: true\n\npermissions:\n pull-requests: write\n\njobs:\n regenerate-pg-settings:\n runs-on: ubuntu-22.04\n\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - name: Add comment\n uses: thollander/actions-comment-pull-request@65f9e5c9a1f2cd378bd74b2e057c9736982a8e74 # v3\n with:\n comment-tag: ${{ github.job }}\n pr-number: ${{ github.event.number }}\n message: |\n If this PR added a GUC in the Postgres fork or `neon` extension,\n please regenerate the Postgres settings in the `cloud` repo:\n\n ```\n make NEON_WORKDIR=path/to/neon/checkout \\n -C goapp/internal/shareddomain/postgres generate\n ```\n\n If you're an external contributor, a Neon employee will assist in\n making sure this step is done.\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\regenerate-pg-setting.yml | regenerate-pg-setting.yml | YAML | 1,284 | 0.8 | 0 | 0 | react-lib | 524 | 2024-11-28T23:03:31.307007 | BSD-3-Clause | false | d3949a2f0f202cc3d9a953264760c892 |
name: Notify Slack channel about upcoming release\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.event.number }}\n cancel-in-progress: true\n\non:\n pull_request:\n branches:\n - release\n types:\n # Default types that triggers a workflow:\n # - https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request\n - opened\n - synchronize\n - reopened\n # Additional types that we want to handle:\n - closed\n\njobs:\n notify:\n runs-on: ubuntu-22.04\n\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - uses: neondatabase/dev-actions/release-pr-notify@483a843f2a8bcfbdc4c69d27630528a3ddc4e14b # main\n with:\n slack-token: ${{ secrets.SLACK_BOT_TOKEN }}\n slack-channel-id: ${{ vars.SLACK_UPCOMING_RELEASE_CHANNEL_ID || 'C05QQ9J1BRC' }} # if not set, then `#test-release-notifications`\n github-token: ${{ secrets.GITHUB_TOKEN }}\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\release-notify.yml | release-notify.yml | YAML | 1,098 | 0.8 | 0.029412 | 0.103448 | python-kit | 869 | 2024-08-06T18:13:10.784548 | GPL-3.0 | false | 6f8dbfd94d33677c541f6c867c96b041 |
name: Create Release Branch\n\non:\n schedule:\n # It should be kept in sync with if-condition in jobs\n - cron: '0 6 * * TUE' # Proxy release\n - cron: '0 6 * * FRI' # Storage release\n - cron: '0 7 * * FRI' # Compute release\n workflow_dispatch:\n inputs:\n create-storage-release-branch:\n type: boolean\n description: 'Create Storage release PR'\n required: false\n create-proxy-release-branch:\n type: boolean\n description: 'Create Proxy release PR'\n required: false\n create-compute-release-branch:\n type: boolean\n description: 'Create Compute release PR'\n required: false\n\n# No permission for GITHUB_TOKEN by default; the **minimal required** set of permissions should be granted in each job.\npermissions: {}\n\ndefaults:\n run:\n shell: bash -euo pipefail {0}\n\njobs:\n create-storage-release-branch:\n if: ${{ github.event.schedule == '0 6 * * FRI' || inputs.create-storage-release-branch }}\n\n permissions:\n contents: write\n\n uses: ./.github/workflows/_create-release-pr.yml\n with:\n component-name: 'Storage'\n source-branch: ${{ github.ref_name }}\n secrets:\n ci-access-token: ${{ secrets.CI_ACCESS_TOKEN }}\n\n create-proxy-release-branch:\n if: ${{ github.event.schedule == '0 6 * * TUE' || inputs.create-proxy-release-branch }}\n\n permissions:\n contents: write\n\n uses: ./.github/workflows/_create-release-pr.yml\n with:\n component-name: 'Proxy'\n source-branch: ${{ github.ref_name }}\n secrets:\n ci-access-token: ${{ secrets.CI_ACCESS_TOKEN }}\n\n create-compute-release-branch:\n if: ${{ github.event.schedule == '0 7 * * FRI' || inputs.create-compute-release-branch }}\n\n permissions:\n contents: write\n\n uses: ./.github/workflows/_create-release-pr.yml\n with:\n component-name: 'Compute'\n source-branch: ${{ github.ref_name }}\n secrets:\n ci-access-token: ${{ secrets.CI_ACCESS_TOKEN }}\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\release.yml | release.yml | YAML | 1,972 | 0.95 | 0.072464 | 0.035088 | react-lib | 966 | 2024-08-29T22:22:39.085822 | GPL-3.0 | false | 2a421d7e672e87d4a8d8504e69396b12 |
name: Report Workflow Stats Batch\n\non:\n schedule:\n - cron: '*/15 * * * *'\n - cron: '25 0 * * *'\n - cron: '25 1 * * 6'\n\npermissions:\n contents: read\n\njobs:\n gh-workflow-stats-batch-2h:\n name: GitHub Workflow Stats Batch 2 hours\n if: github.event.schedule == '*/15 * * * *'\n runs-on: ubuntu-22.04\n permissions:\n actions: read\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - name: Export Workflow Run for the past 2 hours\n uses: neondatabase/gh-workflow-stats-action@701b1f202666d0b82e67b4d387e909af2b920127 # v0.2.2\n with:\n db_uri: ${{ secrets.GH_REPORT_STATS_DB_RW_CONNSTR }}\n db_table: "gh_workflow_stats_neon"\n gh_token: ${{ secrets.GITHUB_TOKEN }}\n duration: '2h'\n\n gh-workflow-stats-batch-48h:\n name: GitHub Workflow Stats Batch 48 hours\n if: github.event.schedule == '25 0 * * *'\n runs-on: ubuntu-22.04\n permissions:\n actions: read\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - name: Export Workflow Run for the past 48 hours\n uses: neondatabase/gh-workflow-stats-action@701b1f202666d0b82e67b4d387e909af2b920127 # v0.2.2\n with:\n db_uri: ${{ secrets.GH_REPORT_STATS_DB_RW_CONNSTR }}\n db_table: "gh_workflow_stats_neon"\n gh_token: ${{ secrets.GITHUB_TOKEN }}\n duration: '48h'\n\n gh-workflow-stats-batch-30d:\n name: GitHub Workflow Stats Batch 30 days\n if: github.event.schedule == '25 1 * * 6'\n runs-on: ubuntu-22.04\n permissions:\n actions: read\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - name: Export Workflow Run for the past 30 days\n uses: neondatabase/gh-workflow-stats-action@701b1f202666d0b82e67b4d387e909af2b920127 # v0.2.2\n with:\n db_uri: ${{ secrets.GH_REPORT_STATS_DB_RW_CONNSTR }}\n db_table: "gh_workflow_stats_neon"\n gh_token: ${{ secrets.GITHUB_TOKEN }}\n duration: '720h'\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\report-workflow-stats-batch.yml | report-workflow-stats-batch.yml | YAML | 2,349 | 0.8 | 0.084507 | 0 | vue-tools | 972 | 2024-10-21T13:24:08.456363 | Apache-2.0 | false | 76a5a028bf56f575fd601412ce0c4ac3 |
name: Prepare benchmarking databases by restoring dumps\n\non:\n workflow_call:\n # no inputs needed\n\ndefaults:\n run:\n shell: bash -euxo pipefail {0}\n\npermissions:\n contents: read\n\njobs:\n setup-databases:\n permissions:\n contents: write\n statuses: write\n id-token: write # aws-actions/configure-aws-credentials\n strategy:\n fail-fast: false\n matrix:\n platform: [ aws-rds-postgres, aws-aurora-serverless-v2-postgres, neon, neon_pg17 ]\n database: [ clickbench, tpch, userexample ]\n\n env:\n LD_LIBRARY_PATH: /tmp/neon/pg_install/v16/lib\n PLATFORM: ${{ matrix.platform }}\n PG_BINARIES: /tmp/neon/pg_install/v16/bin\n\n runs-on: [ self-hosted, us-east-2, x64 ]\n container:\n image: ghcr.io/neondatabase/build-tools:pinned-bookworm\n credentials:\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n options: --init\n\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - name: Set up Connection String\n id: set-up-prep-connstr\n run: |\n case "${PLATFORM}" in\n neon)\n CONNSTR=${{ secrets.BENCHMARK_CAPTEST_CONNSTR }}\n ;;\n neon_pg17)\n CONNSTR=${{ secrets.BENCHMARK_CAPTEST_CONNSTR_PG17 }}\n ;;\n aws-rds-postgres)\n CONNSTR=${{ secrets.BENCHMARK_RDS_POSTGRES_CONNSTR }}\n ;;\n aws-aurora-serverless-v2-postgres)\n CONNSTR=${{ secrets.BENCHMARK_RDS_AURORA_CONNSTR }}\n ;;\n *)\n echo >&2 "Unknown PLATFORM=${PLATFORM}"\n exit 1\n ;;\n esac\n\n echo "connstr=${CONNSTR}" >> $GITHUB_OUTPUT\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n - name: Configure AWS credentials\n uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2\n with:\n aws-region: eu-central-1\n role-to-assume: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}\n role-duration-seconds: 18000 # 5 hours\n\n - name: Download Neon artifact\n uses: ./.github/actions/download\n with:\n name: neon-${{ runner.os }}-${{ runner.arch }}-release-artifact\n path: /tmp/neon/\n prefix: latest\n aws-oicd-role-arn: ${{ vars.DEV_AWS_OIDC_ROLE_ARN }}\n\n # we create a table that has one row for each database that we want to restore with the status whether the restore is done\n - name: Create benchmark_restore_status table if it does not exist\n env:\n BENCHMARK_CONNSTR: ${{ steps.set-up-prep-connstr.outputs.connstr }}\n DATABASE_NAME: ${{ matrix.database }}\n # to avoid a race condition of multiple jobs trying to create the table at the same time,\n # we use an advisory lock\n run: |\n ${PG_BINARIES}/psql "${{ env.BENCHMARK_CONNSTR }}" -c "\n SELECT pg_advisory_lock(4711);\n CREATE TABLE IF NOT EXISTS benchmark_restore_status (\n databasename text primary key,\n restore_done boolean\n );\n SELECT pg_advisory_unlock(4711);\n "\n\n - name: Check if restore is already done\n id: check-restore-done\n env:\n BENCHMARK_CONNSTR: ${{ steps.set-up-prep-connstr.outputs.connstr }}\n DATABASE_NAME: ${{ matrix.database }}\n run: |\n skip=false\n if ${PG_BINARIES}/psql "${{ env.BENCHMARK_CONNSTR }}" -tAc "SELECT 1 FROM benchmark_restore_status WHERE databasename='${{ env.DATABASE_NAME }}' AND restore_done=true;" | grep -q 1; then\n echo "Restore already done for database ${{ env.DATABASE_NAME }} on platform ${{ env.PLATFORM }}. Skipping this database."\n skip=true\n fi\n echo "skip=${skip}" | tee -a $GITHUB_OUTPUT\n\n - name: Check and create database if it does not exist\n if: steps.check-restore-done.outputs.skip != 'true'\n env:\n BENCHMARK_CONNSTR: ${{ steps.set-up-prep-connstr.outputs.connstr }}\n DATABASE_NAME: ${{ matrix.database }}\n run: |\n DB_EXISTS=$(${PG_BINARIES}/psql "${{ env.BENCHMARK_CONNSTR }}" -tAc "SELECT 1 FROM pg_database WHERE datname='${{ env.DATABASE_NAME }}'")\n if [ "$DB_EXISTS" != "1" ]; then\n echo "Database ${{ env.DATABASE_NAME }} does not exist. Creating it..."\n ${PG_BINARIES}/psql "${{ env.BENCHMARK_CONNSTR }}" -c "CREATE DATABASE \"${{ env.DATABASE_NAME }}\";"\n else\n echo "Database ${{ env.DATABASE_NAME }} already exists."\n fi\n\n - name: Download dump from S3 to /tmp/dumps\n if: steps.check-restore-done.outputs.skip != 'true'\n env:\n DATABASE_NAME: ${{ matrix.database }}\n run: |\n mkdir -p /tmp/dumps\n aws s3 cp s3://neon-github-dev/performance/pgdumps/$DATABASE_NAME/$DATABASE_NAME.pg_dump /tmp/dumps/\n\n - name: Replace database name in connection string\n if: steps.check-restore-done.outputs.skip != 'true'\n id: replace-dbname\n env:\n DATABASE_NAME: ${{ matrix.database }}\n BENCHMARK_CONNSTR: ${{ steps.set-up-prep-connstr.outputs.connstr }}\n run: |\n # Extract the part before the database name\n base_connstr="${BENCHMARK_CONNSTR%/*}"\n # Extract the query parameters (if any) after the database name\n query_params="${BENCHMARK_CONNSTR#*\?}"\n # Reconstruct the new connection string\n if [ "$query_params" != "$BENCHMARK_CONNSTR" ]; then\n new_connstr="${base_connstr}/${DATABASE_NAME}?${query_params}"\n else\n new_connstr="${base_connstr}/${DATABASE_NAME}"\n fi\n echo "database_connstr=${new_connstr}" >> $GITHUB_OUTPUT\n\n - name: Restore dump\n if: steps.check-restore-done.outputs.skip != 'true'\n env:\n DATABASE_NAME: ${{ matrix.database }}\n DATABASE_CONNSTR: ${{ steps.replace-dbname.outputs.database_connstr }}\n # the following works only with larger computes:\n # PGOPTIONS: "-c maintenance_work_mem=8388608 -c max_parallel_maintenance_workers=7"\n # we add the || true because:\n # the dumps were created with Neon and contain neon extensions that are not\n # available in RDS, so we will always report an error, but we can ignore it\n run: |\n ${PG_BINARIES}/pg_restore --clean --if-exists --no-owner --jobs=4 \\n -d "${DATABASE_CONNSTR}" /tmp/dumps/${DATABASE_NAME}.pg_dump || true\n\n - name: Update benchmark_restore_status table\n if: steps.check-restore-done.outputs.skip != 'true'\n env:\n BENCHMARK_CONNSTR: ${{ steps.set-up-prep-connstr.outputs.connstr }}\n DATABASE_NAME: ${{ matrix.database }}\n run: |\n ${PG_BINARIES}/psql "${{ env.BENCHMARK_CONNSTR }}" -c "\n INSERT INTO benchmark_restore_status (databasename, restore_done) VALUES ('${{ env.DATABASE_NAME }}', true)\n ON CONFLICT (databasename) DO UPDATE SET restore_done = true;\n "\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\_benchmarking_preparation.yml | _benchmarking_preparation.yml | YAML | 7,024 | 0.8 | 0.083333 | 0.080745 | awesome-app | 496 | 2023-11-12T12:02:18.877039 | BSD-3-Clause | false | 137880368b78024ccb60ec51beb54b12 |
name: Check Codestyle Python\n\non:\n workflow_call:\n inputs:\n build-tools-image:\n description: 'build-tools image'\n required: true\n type: string\n\ndefaults:\n run:\n shell: bash -euxo pipefail {0}\n\npermissions:\n contents: read\n\njobs:\n check-codestyle-python:\n runs-on: [ self-hosted, small ]\n\n permissions:\n packages: read\n\n container:\n image: ${{ inputs.build-tools-image }}\n credentials:\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n options: --init\n\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n\n - name: Cache poetry deps\n uses: tespkg/actions-cache@b7bf5fcc2f98a52ac6080eb0fd282c2f752074b1 # v1.8.0\n with:\n endpoint: ${{ vars.HETZNER_CACHE_REGION }}.${{ vars.HETZNER_CACHE_ENDPOINT }}\n bucket: ${{ vars.HETZNER_CACHE_BUCKET }}\n accessKey: ${{ secrets.HETZNER_CACHE_ACCESS_KEY }}\n secretKey: ${{ secrets.HETZNER_CACHE_SECRET_KEY }}\n use-fallback: false\n path: ~/.cache/pypoetry/virtualenvs\n key: v2-${{ runner.os }}-${{ runner.arch }}-python-deps-bookworm-${{ hashFiles('poetry.lock') }}\n\n - run: ./scripts/pysync\n\n - run: poetry run ruff check .\n - run: poetry run ruff format --check .\n - run: poetry run mypy .\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\_check-codestyle-python.yml | _check-codestyle-python.yml | YAML | 1,565 | 0.95 | 0 | 0 | react-lib | 663 | 2023-12-30T14:48:40.480425 | GPL-3.0 | false | a1395da12e53b8d0c97d75af9ca7f1c7 |
name: Check Codestyle Rust\n\non:\n workflow_call:\n inputs:\n build-tools-image:\n description: "build-tools image"\n required: true\n type: string\n archs:\n description: "Json array of architectures to run on"\n type: string\n\n\ndefaults:\n run:\n shell: bash -euxo pipefail {0}\n\n# No permission for GITHUB_TOKEN by default; the **minimal required** set of permissions should be granted in each job.\npermissions: {}\n\njobs:\n check-codestyle-rust:\n strategy:\n matrix:\n arch: ${{ fromJSON(inputs.archs) }}\n runs-on: ${{ fromJSON(format('["self-hosted", "{0}"]', matrix.arch == 'arm64' && 'small-arm64' || 'small')) }}\n\n permissions:\n packages: read\n\n container:\n image: ${{ inputs.build-tools-image }}\n credentials:\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n options: --init\n\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - name: Checkout\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: true\n\n - name: Cache cargo deps\n uses: tespkg/actions-cache@b7bf5fcc2f98a52ac6080eb0fd282c2f752074b1 # v1.8.0\n with:\n endpoint: ${{ vars.HETZNER_CACHE_REGION }}.${{ vars.HETZNER_CACHE_ENDPOINT }}\n bucket: ${{ vars.HETZNER_CACHE_BUCKET }}\n accessKey: ${{ secrets.HETZNER_CACHE_ACCESS_KEY }}\n secretKey: ${{ secrets.HETZNER_CACHE_SECRET_KEY }}\n use-fallback: false\n path: |\n ~/.cargo/registry\n !~/.cargo/registry/src\n ~/.cargo/git\n target\n key: v1-${{ runner.os }}-${{ runner.arch }}-cargo-${{ hashFiles('./Cargo.lock') }}-${{ hashFiles('./rust-toolchain.toml') }}-rust\n\n # Some of our rust modules use FFI and need those to be checked\n - name: Get postgres headers\n run: make postgres-headers -j$(nproc)\n\n # cargo hack runs the given cargo subcommand (clippy in this case) for all feature combinations.\n # This will catch compiler & clippy warnings in all feature combinations.\n # TODO: use cargo hack for build and test as well, but, that's quite expensive.\n # NB: keep clippy args in sync with ./run_clippy.sh\n #\n # The only difference between "clippy --debug" and "clippy --release" is that in --release mode,\n # #[cfg(debug_assertions)] blocks are not built. It's not worth building everything for second\n # time just for that, so skip "clippy --release".\n - run: |\n CLIPPY_COMMON_ARGS="$( source .neon_clippy_args; echo "$CLIPPY_COMMON_ARGS")"\n if [ "$CLIPPY_COMMON_ARGS" = "" ]; then\n echo "No clippy args found in .neon_clippy_args"\n exit 1\n fi\n echo "CLIPPY_COMMON_ARGS=${CLIPPY_COMMON_ARGS}" >> $GITHUB_ENV\n - name: Run cargo clippy (debug)\n run: cargo hack --features default --ignore-unknown-features --feature-powerset clippy $CLIPPY_COMMON_ARGS\n\n - name: Check documentation generation\n run: cargo doc --workspace --no-deps --document-private-items\n env:\n RUSTDOCFLAGS: "-Dwarnings -Arustdoc::private_intra_doc_links"\n\n # Use `${{ !cancelled() }}` to run quck tests after the longer clippy run\n - name: Check formatting\n if: ${{ !cancelled() }}\n run: cargo fmt --all -- --check\n\n # https://github.com/facebookincubator/cargo-guppy/tree/bec4e0eb29dcd1faac70b1b5360267fc02bf830e/tools/cargo-hakari#2-keep-the-workspace-hack-up-to-date-in-ci\n - name: Check rust dependencies\n if: ${{ !cancelled() }}\n run: |\n cargo hakari generate --diff # workspace-hack Cargo.toml is up-to-date\n cargo hakari manage-deps --dry-run # all workspace crates depend on workspace-hack\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\_check-codestyle-rust.yml | _check-codestyle-rust.yml | YAML | 3,978 | 0.95 | 0.088235 | 0.137931 | python-kit | 452 | 2024-04-27T23:25:30.178076 | GPL-3.0 | false | 20c2eb08d0969cbdc9841f6e5c83bb98 |
name: Create Release PR\n\non:\n workflow_call:\n inputs:\n component-name:\n description: 'Component name'\n required: true\n type: string\n source-branch:\n description: 'Source branch'\n required: true\n type: string\n secrets:\n ci-access-token:\n description: 'CI access token'\n required: true\n\ndefaults:\n run:\n shell: bash -euo pipefail {0}\n\npermissions:\n contents: read\n\njobs:\n create-release-branch:\n runs-on: ubuntu-22.04\n\n permissions:\n contents: write # for `git push`\n\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n ref: ${{ inputs.source-branch }}\n fetch-depth: 0\n\n - name: Set variables\n id: vars\n env:\n COMPONENT_NAME: ${{ inputs.component-name }}\n RELEASE_BRANCH: >-\n ${{\n false\n || inputs.component-name == 'Storage' && 'release'\n || inputs.component-name == 'Proxy' && 'release-proxy'\n || inputs.component-name == 'Compute' && 'release-compute'\n }}\n run: |\n now_date=$(date -u +'%Y-%m-%d')\n now_time=$(date -u +'%H-%M-%Z')\n {\n echo "title=${COMPONENT_NAME} release ${now_date}"\n echo "rc-branch=rc/${RELEASE_BRANCH}/${now_date}_${now_time}"\n echo "release-branch=${RELEASE_BRANCH}"\n } | tee -a ${GITHUB_OUTPUT}\n\n - name: Configure git\n run: |\n git config user.name "github-actions[bot]"\n git config user.email "41898282+github-actions[bot]@users.noreply.github.com"\n\n - name: Create RC branch\n env:\n RELEASE_BRANCH: ${{ steps.vars.outputs.release-branch }}\n RC_BRANCH: ${{ steps.vars.outputs.rc-branch }}\n TITLE: ${{ steps.vars.outputs.title }}\n run: |\n git switch -c "${RC_BRANCH}"\n\n # Manually create a merge commit on the current branch, keeping the\n # tree and setting the parents to the current HEAD and the HEAD of the\n # release branch. This commit is what we'll fast-forward the release\n # branch to when merging the release branch.\n # For details on why, look at\n # https://docs.neon.build/overview/repositories/neon.html#background-on-commit-history-of-release-prs\n current_tree=$(git rev-parse 'HEAD^{tree}')\n release_head=$(git rev-parse "origin/${RELEASE_BRANCH}")\n current_head=$(git rev-parse HEAD)\n merge_commit=$(git commit-tree -p "${current_head}" -p "${release_head}" -m "${TITLE}" "${current_tree}")\n\n # Fast-forward the current branch to the newly created merge_commit\n git merge --ff-only ${merge_commit}\n\n git push origin "${RC_BRANCH}"\n\n - name: Create a PR into ${{ steps.vars.outputs.release-branch }}\n env:\n GH_TOKEN: ${{ secrets.ci-access-token }}\n RC_BRANCH: ${{ steps.vars.outputs.rc-branch }}\n RELEASE_BRANCH: ${{ steps.vars.outputs.release-branch }}\n TITLE: ${{ steps.vars.outputs.title }}\n run: |\n gh pr create --title "${TITLE}" \\n --body "" \\n --head "${RC_BRANCH}" \\n --base "${RELEASE_BRANCH}"\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\_create-release-pr.yml | _create-release-pr.yml | YAML | 3,401 | 0.95 | 0.019417 | 0.078652 | vue-tools | 933 | 2024-08-18T12:46:10.169532 | BSD-3-Clause | false | fb959fba885cfdb7b9997f1cd1770181 |
name: Generate run metadata\non:\n workflow_call:\n inputs:\n github-event-name:\n type: string\n required: true\n github-event-json:\n type: string\n required: true\n outputs:\n build-tag:\n description: "Tag for the current workflow run"\n value: ${{ jobs.tags.outputs.build-tag }}\n release-tag:\n description: "Tag for the release if this is an RC PR run"\n value: ${{ jobs.tags.outputs.release-tag }}\n previous-storage-release:\n description: "Tag of the last storage release"\n value: ${{ jobs.tags.outputs.storage }}\n previous-proxy-release:\n description: "Tag of the last proxy release"\n value: ${{ jobs.tags.outputs.proxy }}\n previous-compute-release:\n description: "Tag of the last compute release"\n value: ${{ jobs.tags.outputs.compute }}\n run-kind:\n description: "The kind of run we're currently in. Will be one of `push-main`, `storage-release`, `compute-release`, `proxy-release`, `storage-rc-pr`, `compute-rc-pr`, `proxy-rc-pr`, `pr`, or `workflow-dispatch`"\n value: ${{ jobs.tags.outputs.run-kind }}\n release-pr-run-id:\n description: "Only available if `run-kind in [storage-release, proxy-release, compute-release]`. Contains the run ID of the `Build and Test` workflow, assuming one with the current commit can be found."\n value: ${{ jobs.tags.outputs.release-pr-run-id }}\n sha:\n description: "github.event.pull_request.head.sha on release PRs, github.sha otherwise"\n value: ${{ jobs.tags.outputs.sha }}\n\npermissions: {}\n\ndefaults:\n run:\n shell: bash -euo pipefail {0}\n\njobs:\n tags:\n runs-on: ubuntu-22.04\n outputs:\n build-tag: ${{ steps.build-tag.outputs.build-tag }}\n release-tag: ${{ steps.build-tag.outputs.release-tag }}\n compute: ${{ steps.previous-releases.outputs.compute }}\n proxy: ${{ steps.previous-releases.outputs.proxy }}\n storage: ${{ steps.previous-releases.outputs.storage }}\n run-kind: ${{ steps.run-kind.outputs.run-kind }}\n release-pr-run-id: ${{ steps.release-pr-run-id.outputs.release-pr-run-id }}\n sha: ${{ steps.sha.outputs.sha }}\n permissions:\n contents: read\n steps:\n # Need `fetch-depth: 0` to count the number of commits in the branch\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - name: Get run kind\n id: run-kind\n env:\n RUN_KIND: >-\n ${{\n false\n || (inputs.github-event-name == 'push' && github.ref_name == 'main') && 'push-main'\n || (inputs.github-event-name == 'push' && github.ref_name == 'release') && 'storage-release'\n || (inputs.github-event-name == 'push' && github.ref_name == 'release-compute') && 'compute-release'\n || (inputs.github-event-name == 'push' && github.ref_name == 'release-proxy') && 'proxy-release'\n || (inputs.github-event-name == 'pull_request' && github.base_ref == 'release') && 'storage-rc-pr'\n || (inputs.github-event-name == 'pull_request' && github.base_ref == 'release-compute') && 'compute-rc-pr'\n || (inputs.github-event-name == 'pull_request' && github.base_ref == 'release-proxy') && 'proxy-rc-pr'\n || (inputs.github-event-name == 'pull_request') && 'pr'\n || (inputs.github-event-name == 'workflow_dispatch') && 'workflow-dispatch'\n || 'unknown'\n }}\n run: |\n echo "run-kind=$RUN_KIND" | tee -a $GITHUB_OUTPUT\n\n - name: Get the right SHA\n id: sha\n env:\n SHA: >\n ${{\n contains(fromJSON('["storage-rc-pr", "proxy-rc-pr", "compute-rc-pr"]'), steps.run-kind.outputs.run-kind)\n && fromJSON(inputs.github-event-json).pull_request.head.sha\n || github.sha\n }}\n run: |\n echo "sha=$SHA" | tee -a $GITHUB_OUTPUT\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n fetch-depth: 0\n ref: ${{ steps.sha.outputs.sha }}\n\n - name: Get build tag\n id: build-tag\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n CURRENT_BRANCH: ${{ github.head_ref || github.ref_name }}\n CURRENT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}\n RUN_KIND: ${{ steps.run-kind.outputs.run-kind }}\n run: |\n case $RUN_KIND in\n push-main)\n echo "build-tag=$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT\n ;;\n storage-release)\n echo "build-tag=release-$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT\n ;;\n proxy-release)\n echo "build-tag=release-proxy-$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT\n ;;\n compute-release)\n echo "build-tag=release-compute-$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT\n ;;\n pr|storage-rc-pr|compute-rc-pr|proxy-rc-pr)\n BUILD_AND_TEST_RUN_ID=$(gh api --paginate \\n -H "Accept: application/vnd.github+json" \\n -H "X-GitHub-Api-Version: 2022-11-28" \\n "/repos/${GITHUB_REPOSITORY}/actions/runs?head_sha=${CURRENT_SHA}&branch=${CURRENT_BRANCH}" \\n | jq '[.workflow_runs[] | select(.name == "Build and Test")][0].id // ("Error: No matching workflow run found." | halt_error(1))')\n echo "build-tag=$BUILD_AND_TEST_RUN_ID" | tee -a $GITHUB_OUTPUT\n case $RUN_KIND in\n storage-rc-pr)\n echo "release-tag=release-$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT\n ;;\n proxy-rc-pr)\n echo "release-tag=release-proxy-$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT\n ;;\n compute-rc-pr)\n echo "release-tag=release-compute-$(git rev-list --count HEAD)" | tee -a $GITHUB_OUTPUT\n ;;\n esac\n ;;\n workflow-dispatch)\n echo "build-tag=$GITHUB_RUN_ID" | tee -a $GITHUB_OUTPUT\n ;;\n *)\n echo "Unexpected RUN_KIND ('${RUN_KIND}'), failing to assign build-tag!"\n exit 1\n esac\n\n - name: Get the previous release-tags\n id: previous-releases\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n run: |\n gh api --paginate \\n -H "Accept: application/vnd.github+json" \\n -H "X-GitHub-Api-Version: 2022-11-28" \\n "/repos/${GITHUB_REPOSITORY}/releases" \\n | jq -f .github/scripts/previous-releases.jq -r \\n | tee -a "${GITHUB_OUTPUT}"\n\n - name: Get the release PR run ID\n id: release-pr-run-id\n if: ${{ contains(fromJSON('["storage-release", "compute-release", "proxy-release"]'), steps.run-kind.outputs.run-kind) }}\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n CURRENT_SHA: ${{ github.sha }}\n run: |\n RELEASE_PR_RUN_ID=$(gh api "/repos/${GITHUB_REPOSITORY}/actions/runs?head_sha=$CURRENT_SHA" | jq '[.workflow_runs[] | select(.name == "Build and Test") | select(.head_branch | test("^rc/release.*$"; "s"))] | first | .id // ("Failed to find Build and Test run from RC PR!" | halt_error(1))')\n echo "release-pr-run-id=$RELEASE_PR_RUN_ID" | tee -a $GITHUB_OUTPUT\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\_meta.yml | _meta.yml | YAML | 7,710 | 0.95 | 0.029586 | 0.0125 | node-utils | 662 | 2024-07-07T08:18:47.279708 | MIT | false | de9577cf3f5cd0f87a4e79d7faacee39 |
name: Push images to Container Registry\non:\n workflow_call:\n inputs:\n # Example: {"docker.io/neondatabase/neon:13196061314":["${{ vars.NEON_DEV_AWS_ACCOUNT_ID }}.dkr.ecr.${{ vars.AWS_ECR_REGION }}.amazonaws.com/neon:13196061314","neoneastus2.azurecr.io/neondatabase/neon:13196061314"]}\n image-map:\n description: JSON map of images, mapping from a source image to an array of target images that should be pushed.\n required: true\n type: string\n aws-region:\n description: AWS region to log in to. Required when pushing to ECR.\n required: false\n type: string\n aws-account-id:\n description: AWS account ID to log in to for pushing to ECR. Required when pushing to ECR.\n required: false\n type: string\n aws-role-to-assume:\n description: AWS role to assume to for pushing to ECR. Required when pushing to ECR.\n required: false\n type: string\n azure-client-id:\n description: Client ID of Azure managed identity or Entra app. Required when pushing to ACR.\n required: false\n type: string\n azure-subscription-id:\n description: Azure subscription ID. Required when pushing to ACR.\n required: false\n type: string\n azure-tenant-id:\n description: Azure tenant ID. Required when pushing to ACR.\n required: false\n type: string\n acr-registry-name:\n description: ACR registry name. Required when pushing to ACR.\n required: false\n type: string\n\npermissions: {}\n\ndefaults:\n run:\n shell: bash -euo pipefail {0}\n\njobs:\n push-to-container-registry:\n runs-on: ubuntu-22.04\n permissions:\n id-token: write # Required for aws/azure login\n packages: write # required for pushing to GHCR\n steps:\n - name: Harden the runner (Audit all outbound calls)\n uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0\n with:\n egress-policy: audit\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n sparse-checkout: .github/scripts/push_with_image_map.py\n sparse-checkout-cone-mode: false\n\n - name: Print image-map\n run: echo '${{ inputs.image-map }}' | jq\n\n - name: Configure AWS credentials\n if: contains(inputs.image-map, 'amazonaws.com/')\n uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2\n with:\n aws-region: "${{ inputs.aws-region }}"\n role-to-assume: "arn:aws:iam::${{ inputs.aws-account-id }}:role/${{ inputs.aws-role-to-assume }}"\n role-duration-seconds: 3600\n\n - name: Login to ECR\n if: contains(inputs.image-map, 'amazonaws.com/')\n uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1\n with:\n registries: "${{ inputs.aws-account-id }}"\n\n - name: Configure Azure credentials\n if: contains(inputs.image-map, 'azurecr.io/')\n uses: azure/login@6c251865b4e6290e7b78be643ea2d005bc51f69a # @v2.1.1\n with:\n client-id: ${{ inputs.azure-client-id }}\n subscription-id: ${{ inputs.azure-subscription-id }}\n tenant-id: ${{ inputs.azure-tenant-id }}\n\n - name: Login to ACR\n if: contains(inputs.image-map, 'azurecr.io/')\n run: |\n az acr login --name=${{ inputs.acr-registry-name }}\n\n - name: Login to GHCR\n if: contains(inputs.image-map, 'ghcr.io/')\n uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0\n with:\n registry: ghcr.io\n username: ${{ github.actor }}\n password: ${{ secrets.GITHUB_TOKEN }}\n\n - name: Log in to Docker Hub\n uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0\n with:\n username: ${{ secrets.NEON_DOCKERHUB_USERNAME }}\n password: ${{ secrets.NEON_DOCKERHUB_PASSWORD }}\n\n - name: Copy docker images to target registries\n id: push\n run: python3 .github/scripts/push_with_image_map.py\n env:\n IMAGE_MAP: ${{ inputs.image-map }}\n\n - name: Notify Slack if container image pushing fails\n if: steps.push.outputs.push_failures || failure()\n uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0\n with:\n method: chat.postMessage\n token: ${{ secrets.SLACK_BOT_TOKEN }}\n payload: |\n channel: ${{ vars.SLACK_ON_CALL_DEVPROD_STREAM }}\n text: >\n *Container image pushing ${{\n steps.push.outcome == 'failure' && 'failed completely' || 'succeeded with some retries'\n }}* in\n <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|GitHub Run>\n\n ${{ steps.push.outputs.push_failures && format(\n '*Failed targets:*\nβ’ {0}', join(fromJson(steps.push.outputs.push_failures), '\nβ’ ')\n ) || '' }}\n | dataset_sample\yaml\neondatabase_neon\.github\workflows\_push-to-container-registry.yml | _push-to-container-registry.yml | YAML | 5,076 | 0.95 | 0.085938 | 0.017544 | python-kit | 382 | 2025-06-18T17:19:18.296835 | MIT | false | abaca8a9ab1acc2d33aeec45a6f8d532 |
services:\n minio:\n restart: always\n image: quay.io/minio/minio:RELEASE.2022-10-20T00-55-09Z\n ports:\n - 9000:9000\n - 9001:9001\n environment:\n - MINIO_ROOT_USER=minio\n - MINIO_ROOT_PASSWORD=password\n command: server /data --address :9000 --console-address ":9001"\n\n minio_create_buckets:\n image: minio/mc\n environment:\n - MINIO_ROOT_USER=minio\n - MINIO_ROOT_PASSWORD=password\n entrypoint:\n - "/bin/sh"\n - "-c"\n command:\n - "until (/usr/bin/mc alias set minio http://minio:9000 $$MINIO_ROOT_USER $$MINIO_ROOT_PASSWORD) do\n echo 'Waiting to start minio...' && sleep 1;\n done;\n /usr/bin/mc mb minio/neon --region=eu-north-1;\n exit 0;"\n depends_on:\n - minio\n\n pageserver:\n restart: always\n image: ${REPOSITORY:-ghcr.io/neondatabase}/neon:${TAG:-latest}\n environment:\n - AWS_ACCESS_KEY_ID=minio\n - AWS_SECRET_ACCESS_KEY=password\n #- RUST_BACKTRACE=1\n ports:\n #- 6400:6400 # pg protocol handler\n - 9898:9898 # http endpoints\n volumes:\n - ./pageserver_config:/data/.neon/\n depends_on:\n - storage_broker\n - minio_create_buckets\n\n safekeeper1:\n restart: always\n image: ${REPOSITORY:-ghcr.io/neondatabase}/neon:${TAG:-latest}\n environment:\n - SAFEKEEPER_ADVERTISE_URL=safekeeper1:5454\n - SAFEKEEPER_ID=1\n - BROKER_ENDPOINT=http://storage_broker:50051\n - AWS_ACCESS_KEY_ID=minio\n - AWS_SECRET_ACCESS_KEY=password\n #- RUST_BACKTRACE=1\n ports:\n #- 5454:5454 # pg protocol handler\n - 7676:7676 # http endpoints\n entrypoint:\n - "/bin/sh"\n - "-c"\n command:\n - "safekeeper --listen-pg=$$SAFEKEEPER_ADVERTISE_URL\n --listen-http='0.0.0.0:7676'\n --id=$$SAFEKEEPER_ID\n --broker-endpoint=$$BROKER_ENDPOINT\n -D /data\n --remote-storage=\"{endpoint='http://minio:9000',\n bucket_name='neon',\n bucket_region='eu-north-1',\n prefix_in_bucket='/safekeeper/'}\""\n depends_on:\n - storage_broker\n - minio_create_buckets\n\n safekeeper2:\n restart: always\n image: ${REPOSITORY:-ghcr.io/neondatabase}/neon:${TAG:-latest}\n environment:\n - SAFEKEEPER_ADVERTISE_URL=safekeeper2:5454\n - SAFEKEEPER_ID=2\n - BROKER_ENDPOINT=http://storage_broker:50051\n - AWS_ACCESS_KEY_ID=minio\n - AWS_SECRET_ACCESS_KEY=password\n #- RUST_BACKTRACE=1\n ports:\n #- 5454:5454 # pg protocol handler\n - 7677:7676 # http endpoints\n entrypoint:\n - "/bin/sh"\n - "-c"\n command:\n - "safekeeper --listen-pg=$$SAFEKEEPER_ADVERTISE_URL\n --listen-http='0.0.0.0:7676'\n --id=$$SAFEKEEPER_ID\n --broker-endpoint=$$BROKER_ENDPOINT\n -D /data\n --remote-storage=\"{endpoint='http://minio:9000',\n bucket_name='neon',\n bucket_region='eu-north-1',\n prefix_in_bucket='/safekeeper/'}\""\n depends_on:\n - storage_broker\n - minio_create_buckets\n\n safekeeper3:\n restart: always\n image: ${REPOSITORY:-ghcr.io/neondatabase}/neon:${TAG:-latest}\n environment:\n - SAFEKEEPER_ADVERTISE_URL=safekeeper3:5454\n - SAFEKEEPER_ID=3\n - BROKER_ENDPOINT=http://storage_broker:50051\n - AWS_ACCESS_KEY_ID=minio\n - AWS_SECRET_ACCESS_KEY=password\n #- RUST_BACKTRACE=1\n ports:\n #- 5454:5454 # pg protocol handler\n - 7678:7676 # http endpoints\n entrypoint:\n - "/bin/sh"\n - "-c"\n command:\n - "safekeeper --listen-pg=$$SAFEKEEPER_ADVERTISE_URL\n --listen-http='0.0.0.0:7676'\n --id=$$SAFEKEEPER_ID\n --broker-endpoint=$$BROKER_ENDPOINT\n -D /data\n --remote-storage=\"{endpoint='http://minio:9000',\n bucket_name='neon',\n bucket_region='eu-north-1',\n prefix_in_bucket='/safekeeper/'}\""\n depends_on:\n - storage_broker\n - minio_create_buckets\n\n storage_broker:\n restart: always\n image: ${REPOSITORY:-ghcr.io/neondatabase}/neon:${TAG:-latest}\n ports:\n - 50051:50051\n command:\n - "storage_broker"\n - "--listen-addr=0.0.0.0:50051"\n\n compute:\n restart: always\n build:\n context: ./compute_wrapper/\n args:\n - REPOSITORY=${REPOSITORY:-ghcr.io/neondatabase}\n - COMPUTE_IMAGE=compute-node-v${PG_VERSION:-16}\n - TAG=${COMPUTE_TAG:-${TAG:-latest}}\n - http_proxy=${http_proxy:-}\n - https_proxy=${https_proxy:-}\n environment:\n - PG_VERSION=${PG_VERSION:-16}\n - TENANT_ID=${TENANT_ID:-}\n - TIMELINE_ID=${TIMELINE_ID:-}\n #- RUST_BACKTRACE=1\n # Mount the test files directly, for faster editing cycle.\n volumes:\n - ./compute_wrapper/var/db/postgres/configs/:/var/db/postgres/configs/\n - ./compute_wrapper/shell/:/shell/\n ports:\n - 55433:55433 # pg protocol handler\n - 3080:3080 # http endpoints\n entrypoint:\n - "/shell/compute.sh"\n depends_on:\n - safekeeper1\n - safekeeper2\n - safekeeper3\n - pageserver\n\n compute_is_ready:\n image: postgres:latest\n entrypoint:\n - "/bin/bash"\n - "-c"\n command:\n - "until pg_isready -h compute -p 55433 -U cloud_admin ; do\n echo 'Waiting to start compute...' && sleep 1;\n done"\n depends_on:\n - compute\n\n neon-test-extensions:\n profiles: ["test-extensions"]\n image: ${REPOSITORY:-ghcr.io/neondatabase}/neon-test-extensions-v${PG_TEST_VERSION:-16}:${TEST_EXTENSIONS_TAG:-${TAG:-latest}}\n environment:\n - PGPASSWORD=cloud_admin\n entrypoint:\n - "/bin/bash"\n - "-c"\n command:\n - sleep 1800\n depends_on:\n - compute\n | dataset_sample\yaml\neondatabase_neon\docker-compose\docker-compose.yml | docker-compose.yml | YAML | 6,136 | 0.8 | 0.005051 | 0.05291 | awesome-app | 72 | 2023-08-17T07:08:24.528280 | Apache-2.0 | false | 16bb9b0047b53e80971d12cfd1b68f45 |
openapi: "3.0.2"\ninfo:\n title: Page Server API\n description: Neon Pageserver API\n version: "1.0"\n license:\n name: "Apache"\n url: https://github.com/neondatabase/neon/blob/main/LICENSE\nservers:\n - url: ""\npaths:\n /v1/status:\n description: Healthcheck endpoint\n get:\n description: Healthcheck\n security: []\n responses:\n "200":\n description: OK\n content:\n application/json:\n schema:\n type: object\n required:\n - id\n properties:\n id:\n type: integer\n\n /v1/disk_usage_eviction/run:\n put:\n description: Do an iteration of disk-usage-based eviction to evict a given amount of disk space.\n security: []\n requestBody:\n content:\n application/json:\n schema:\n type: object\n required:\n - evict_bytes\n properties:\n evict_bytes:\n type: integer\n responses:\n "200":\n description: |\n The run completed.\n This does not necessarily mean that we actually evicted `evict_bytes`.\n Examine the returned object for detail, or, just watch the actual effect of the call using `du` or `df`.\n content:\n application/json:\n schema:\n type: object\n\n /v1/reload_auth_validation_keys:\n post:\n description: Reloads the JWT public keys from their pre-configured location on disk.\n responses:\n "200":\n description: The reload completed successfully.\n\n /v1/tenant/{tenant_id}:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n get:\n description: Get tenant status\n responses:\n "200":\n description: Currently returns the flag whether the tenant has inprogress timeline downloads\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/TenantInfo"\n\n delete:\n description: |\n Attempts to delete specified tenant. 500, 503 and 409 errors should be retried. Deleting\n a non-existent tenant is considered successful (returns 200).\n responses:\n "200":\n description: Tenant was successfully deleted, or was already not found.\n "503":\n description: Service is unavailable, or tenant is already being modified (perhaps concurrently deleted)\n\n\n /v1/tenant/{tenant_id}/time_travel_remote_storage:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n - name: travel_to\n in: query\n required: true\n schema:\n type: string\n format: date-time\n - name: done_if_after\n in: query\n required: true\n schema:\n type: string\n format: date-time\n put:\n description: Time travel the tenant's remote storage\n responses:\n "200":\n description: OK\n content:\n application/json:\n schema:\n type: string\n\n /v1/tenant/{tenant_id}/timeline:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n get:\n description: Get timelines for tenant\n responses:\n "200":\n description: TimelineInfo\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: "#/components/schemas/TimelineInfo"\n\n\n /v1/tenant/{tenant_id}/timeline/{timeline_id}:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n format: hex\n get:\n description: Get info about the timeline\n responses:\n "200":\n description: TimelineInfo\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/TimelineInfo"\n\n delete:\n description: "Attempts to delete specified timeline. 500 and 409 errors should be retried"\n responses:\n "404":\n description: Timeline not found. This is the success path.\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/NotFoundError"\n "409":\n description: Deletion is already in progress, continue polling\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ConflictError"\n "412":\n description: Tenant is missing, or timeline has children\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/PreconditionFailedError"\n\n /v1/tenant/{tenant_id}/timeline/{timeline_id}/get_timestamp_of_lsn:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n format: hex\n get:\n description: Get timestamp for a given LSN\n parameters:\n - name: lsn\n in: query\n required: true\n schema:\n type: string\n format: hex\n description: A LSN to get the timestamp\n responses:\n "200":\n description: OK\n content:\n application/json:\n schema:\n type: string\n format: date-time\n "412":\n description: No timestamp is found for given LSN, e.g. if there had been no commits till LSN\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/PreconditionFailedError"\n\n /v1/tenant/{tenant_id}/timeline/{timeline_id}/get_lsn_by_timestamp:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n format: hex\n get:\n description: Get LSN by a timestamp\n parameters:\n - name: timestamp\n in: query\n required: true\n schema:\n type: string\n format: date-time\n description: A timestamp to get the LSN\n - name: with_lease\n in: query\n required: false\n schema:\n type: boolean\n description: Whether to grant a lease to the corresponding LSN. Default to false.\n\n responses:\n "200":\n description: OK\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/LsnByTimestampResponse"\n\n /v1/tenant/{tenant_shard_id}/timeline/{timeline_id}/lsn_lease:\n parameters:\n - name: tenant_shard_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n format: hex\n post:\n description: Obtains a lease for the given LSN.\n requestBody:\n content:\n application/json:\n schema:\n type: object\n required:\n - lsn\n properties:\n lsn:\n description: A LSN to obtain the lease for.\n type: string\n format: hex\n responses:\n "200":\n description: OK\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/LsnLease"\n\n /v1/tenant/{tenant_id}/timeline/{timeline_id}/do_gc:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n format: hex\n put:\n description: Garbage collect given timeline\n responses:\n "200":\n description: OK\n content:\n application/json:\n schema:\n type: string\n\n /v1/tenant/{tenant_shard_id}/timeline/{timeline_id}/block_gc:\n parameters:\n - name: tenant_shard_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n format: hex\n post:\n description: Persistently add a gc blocking at the tenant level because of this timeline\n responses:\n "200":\n description: OK\n\n /v1/tenant/{tenant_shard_id}/timeline/{timeline_id}/unblock_gc:\n parameters:\n - name: tenant_shard_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n format: hex\n post:\n description: Persistently remove a tenant level gc blocking for this timeline\n responses:\n "200":\n description: OK\n\n /v1/tenant/{tenant_shard_id}/location_config:\n parameters:\n - name: tenant_shard_id\n in: path\n required: true\n schema:\n type: string\n - name: flush_ms\n in: query\n required: false\n schema:\n type: integer\n - name: lazy\n in: query\n required: false\n schema:\n type: boolean\n description: Set to true for attaches to queue up until activated by compute. Eager (false) is the default.\n put:\n description: |\n Configures a _tenant location_, that is how a particular pageserver handles\n a particular tenant. This includes _attached_ tenants, i.e. those ingesting WAL\n and page service requests, and _secondary_ tenants, i.e. those which are just keeping\n a warm cache in anticipation of transitioning to attached state in the future.\n\n This is a declarative, idempotent API: there are not separate endpoints\n for different tenant location configurations. Rather, this single endpoint accepts\n a description of the desired location configuration, and makes whatever changes\n are required to reach that state.\n\n In imperative terms, this API is used to attach and detach tenants, and\n to transition tenants to and from secondary mode.\n\n This is a synchronous API: there is no 202 response. State transitions should always\n be fast (milliseconds), with the exception of requests setting `flush_ms`, in which case\n the caller controls the runtime of the request.\n\n In some state transitions, it makes sense to flush dirty data to remote storage: this includes transitions\n to AttachedStale and Detached. Flushing is never necessary for correctness, but is an\n important optimization when doing migrations. The `flush_ms` parameter controls whether\n flushing should be attempted, and how much time is allowed for flushing. If the time limit expires,\n the requested transition will continue without waiting for any outstanding data to flush. Callers\n should use a duration which is substantially less than their HTTP client's request\n timeout. It is safe to supply flush_ms irrespective of the request body: in state transitions\n where flushing doesn't make sense, the server will ignore it.\n\n It is safe to retry requests, but if one receives a 409 or 503 response, it is not\n useful to retry aggressively: there is probably an existing request still ongoing.\n requestBody:\n required: false\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/TenantLocationConfigRequest"\n responses:\n "200":\n description: Tenant is now in requested state\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/TenantLocationConfigResponse"\n "409":\n description: |\n The tenant is already being modified, perhaps by a concurrent call to this API\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ConflictError"\n\n /v1/tenant/{tenant_id}/timeline/{timeline_id}/preserve_initdb_archive:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n post:\n description: |\n Marks the initdb archive for preservation upon deletion of the timeline or tenant.\n This is meant to be part of the disaster recovery process.\n responses:\n "202":\n description: Tenant scheduled to load successfully\n\n /v1/tenant/{tenant_shard_id}/timeline/{timeline_id}/archival_config:\n parameters:\n - name: tenant_shard_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n put:\n description: |\n Either archives or unarchives the given timeline.\n An archived timeline may not have any non-archived children.\n requestBody:\n required: true\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ArchivalConfigRequest"\n responses:\n "200":\n description: Timeline (un)archived successfully\n "409":\n description: |\n The tenant/timeline is already being modified, perhaps by a concurrent call to this API\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ConflictError"\n "500":\n description: Generic operation error\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/Error"\n "503":\n description: Temporarily unavailable, please retry.\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ServiceUnavailableError"\n\n /v1/tenant/{tenant_id}/synthetic_size:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n - name: inputs_only\n in: query\n required: false\n schema:\n type: boolean\n description: |\n When true, skip calculation and only provide the model inputs (for debugging). Defaults to false.\n - name: retention_period\n in: query\n required: false\n schema:\n type: integer\n description: |\n Override the default retention period (in bytes) used for size calculation.\n get:\n description: |\n Calculate tenant's size, which is a mixture of WAL (bytes) and logical_size (bytes).\n responses:\n "200":\n description: OK,\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/SyntheticSizeResponse"\n text/html:\n schema:\n type: string\n description: SVG representation of the tenant and its timelines.\n "401":\n description: Unauthorized Error\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/UnauthorizedError"\n "403":\n description: Forbidden Error\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ForbiddenError"\n "500":\n description: Generic operation error\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/Error"\n "503":\n description: Temporarily unavailable, please retry.\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ServiceUnavailableError"\n\n /v1/tenant/{tenant_shard_id}/heatmap_upload:\n parameters:\n - name: tenant_shard_id\n in: path\n required: true\n schema:\n type: string\n post:\n description: |\n If the location is in an attached mode, upload the current state to the remote heatmap\n responses:\n "200":\n description: Success\n\n /v1/tenant/{tenant_shard_id}/secondary/download:\n parameters:\n - name: tenant_shard_id\n in: path\n required: true\n schema:\n type: string\n - name: wait_ms\n description: If set, we will wait this long for download to complete, and if it isn't complete then return 202\n in: query\n required: false\n schema:\n type: integer\n post:\n description: |\n If the location is in secondary mode, download latest heatmap and layers\n responses:\n "200":\n description: Success\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/SecondaryProgress"\n "202":\n description: Download has started but not yet finished\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/SecondaryProgress"\n\n /v1/tenant/{tenant_id}/timeline/:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n post:\n description: |\n Create a timeline. Returns new timeline id on success.\n Recreating the same timeline will succeed if the parameters match the existing timeline.\n If no pg_version is specified, assume DEFAULT_PG_VERSION hardcoded in the pageserver.\n\n To ensure durability, the caller must retry the creation until success.\n Just because the timeline is visible via other endpoints does not mean it is durable.\n Future versions may stop showing timelines that are not yet durable.\n requestBody:\n content:\n application/json:\n schema:\n type: object\n required:\n - new_timeline_id\n properties:\n new_timeline_id:\n type: string\n format: hex\n ancestor_timeline_id:\n type: string\n format: hex\n ancestor_start_lsn:\n type: string\n format: hex\n pg_version:\n type: integer\n existing_initdb_timeline_id:\n type: string\n format: hex\n import_pgdata:\n $ref: "#/components/schemas/TimelineCreateRequestImportPgdata"\n responses:\n "201":\n description: Timeline was created, or already existed with matching parameters\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/TimelineInfo"\n "406":\n description: Permanently unsatisfiable request, don't retry.\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/Error"\n "409":\n description: Timeline already exists, with different parameters. Creation cannot proceed.\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ConflictError"\n "429":\n description: A creation request was sent for the same Timeline Id while a creation was already in progress. Back off and retry.\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/Error"\n\n /v1/tenant/{tenant_shard_id}/timeline/{timeline_id}/detach_ancestor:\n parameters:\n - name: tenant_shard_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n\n put:\n description: |\n Detach a timeline from its ancestor and reparent all ancestors timelines with lower `ancestor_lsn`.\n Current implementation might not be retryable across failure cases, but will be enhanced in future.\n Detaching should be expected to be expensive operation. Timeouts should be retried.\n parameters:\n - name: detach_behavior\n in: query\n required: false\n schema:\n description: Currently valid values are `v1`, `v2`\n type: string\n responses:\n "200":\n description: |\n The timeline has been detached from it's ancestor (now or earlier), and at least the returned timelines have been reparented.\n If any timelines were deleted after reparenting, they might not be on this list.\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/AncestorDetached"\n\n "400":\n description: |\n Number of early checks meaning the timeline cannot be detached now:\n - the ancestor of timeline has an ancestor: not supported, see RFC\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/Error"\n\n "404":\n description: Tenant or timeline not found.\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/NotFoundError"\n\n "409":\n description: |\n The timeline can never be detached:\n - timeline has no ancestor, implying that the timeline has never had an ancestor\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ConflictError"\n\n "500":\n description: |\n Transient error, for example, pageserver shutdown happened while\n processing the request but we were unable to distinguish that. Must\n be retried.\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/Error"\n\n "503":\n description: |\n Temporarily unavailable, please retry. Possible reasons:\n - another timeline detach for the same tenant is underway, please retry later\n - detected shutdown error\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ServiceUnavailableError"\n\n\n /v1/tenant/:\n get:\n description: Get tenants list\n responses:\n "200":\n description: TenantInfo\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: "#/components/schemas/TenantInfo"\n\n post:\n description: |\n Create a tenant. Returns new tenant id on success.\n\n If no new tenant id is specified in parameters, it would be generated. It's an error to recreate the same tenant.\n\n Invalid fields in the tenant config will cause the request to be rejected with status 400.\n requestBody:\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/TenantCreateRequest"\n responses:\n "201":\n description: New tenant created successfully\n content:\n application/json:\n schema:\n type: string\n "409":\n description: Tenant already exists, creation skipped\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/ConflictError"\n\n /v1/tenant/config:\n put:\n description: |\n Update tenant's config by setting it to the provided value\n\n Invalid fields in the tenant config will cause the request to be rejected with status 400.\n requestBody:\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/TenantConfigRequest"\n responses:\n "200":\n description: OK\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: "#/components/schemas/TenantInfo"\n patch:\n description: |\n Update tenant's config additively by patching the updated fields provided.\n Null values unset the field and non-null values upsert it.\n\n Invalid fields in the tenant config will cause the request to be rejected with status 400.\n requestBody:\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/TenantConfigRequest"\n responses:\n "200":\n description: OK\n content:\n application/json:\n schema:\n type: array\n items:\n $ref: "#/components/schemas/TenantInfo"\n\n /v1/tenant/{tenant_id}/config/:\n parameters:\n - name: tenant_id\n in: path\n required: true\n schema:\n type: string\n get:\n description: |\n Returns tenant's config description: specific config overrides a tenant has\n and the effective config.\n responses:\n "200":\n description: Tenant config, specific and effective\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/TenantConfigResponse"\n\n /v1/tenant/{tenant_shard_id}/timeline/{timeline_id}/download_heatmap_layers:\n parameters:\n - name: tenant_shard_id\n in: path\n required: true\n schema:\n type: string\n - name: timeline_id\n in: path\n required: true\n schema:\n type: string\n - name: concurrency\n description: Maximum number of concurrent downloads (capped at remote storage concurrency)\n in: query\n required: false\n schema:\n type: integer\n - name: recurse\n description: When set, will recurse with the downloads into ancestor timelines\n in: query\n required: false\n schema:\n type: boolean\n post:\n description: |\n Download all layers in the specified timeline's heatmap. The `tenant_shard_id` parameter\n may be used to target all shards of a tenant when the unsharded form is used, or a specific\n tenant shard with the sharded form.\n responses:\n "200":\n description: Success\n delete:\n description: Stop any on-going background downloads of heatmap layers for the specified timeline.\n responses:\n "200":\n description: Success\n\n /v1/utilization:\n get:\n description: |\n Returns the pageservers current utilization and fitness score for new tenants.\n\n responses:\n "200":\n description: Pageserver utilization and fitness score\n content:\n application/json:\n schema:\n $ref: "#/components/schemas/PageserverUtilization"\n\ncomponents:\n securitySchemes:\n JWT:\n type: http\n scheme: bearer\n bearerFormat: JWT\n schemas:\n TenantInfo:\n type: object\n required:\n - id\n - attachment_status\n properties:\n id:\n type: string\n current_physical_size:\n type: integer\n attachment_status:\n description: |\n Status of this tenant's attachment to this pageserver.\n\n - `maybe` means almost nothing, don't read anything into it\n except for the fact that the pageserver _might_ be already\n writing to the tenant's S3 state, so, DO NOT ATTACH the\n tenant to any other pageserver, or we risk split-brain.\n - `attached` means that the attach operation has completed,\n successfully\n - `failed` means that attach has failed. For reason check corresponding `reason` failed.\n `failed` is the terminal state, retrying attach call wont resolve the issue.\n For example this can be caused by s3 being unreachable. The retry may be implemented\n with call to detach, though it would be better to not automate it and inspec failed state\n manually before proceeding with a retry.\n type: object\n required:\n - slug\n - data\n properties:\n slug:\n type: string\n enum: [ "maybe", "attached", "failed" ]\n data:\n type: object\n properties:\n reason:\n type: string\n gc_blocking:\n type: string\n\n TenantCreateRequest:\n allOf:\n - $ref: '#/components/schemas/TenantConfig'\n - $ref: '#/components/schemas/TenantLoadRequest'\n - type: object\n required:\n - new_tenant_id\n properties:\n new_tenant_id:\n type: string\n TenantLoadRequest:\n type: object\n properties:\n generation:\n type: integer\n description: Attachment generation number.\n TenantConfigRequest:\n allOf:\n - $ref: '#/components/schemas/TenantConfig'\n - type: object\n required:\n - tenant_id\n properties:\n tenant_id:\n type: string\n TenantLocationConfigRequest:\n type: object\n required:\n - mode\n properties:\n mode:\n type: string\n enum: ["AttachedSingle", "AttachedMulti", "AttachedStale", "Secondary", "Detached"]\n description: Mode of functionality that this pageserver will run in for this tenant.\n generation:\n type: integer\n description: Attachment generation number, mandatory when `mode` is an attached state\n secondary_conf:\n $ref: '#/components/schemas/SecondaryConfig'\n tenant_conf:\n $ref: '#/components/schemas/TenantConfig'\n TenantLocationConfigResponse:\n type: object\n required:\n - shards\n properties:\n shards:\n description: Pageservers where this tenant's shards are attached. Not populated for secondary locations.\n type: array\n items:\n $ref: "#/components/schemas/TenantShardLocation"\n stripe_size:\n description: If multiple shards are present, this field contains the sharding stripe size, else it is null.\n type: integer\n nullable: true\n TenantShardLocation:\n type: object\n required:\n - node_id\n - shard_id\n properties:\n node_id:\n description: Pageserver node ID where this shard is attached\n type: integer\n shard_id:\n description: Tenant shard ID of the shard\n type: string\n SecondaryConfig:\n type: object\n properties:\n warm:\n type: boolean\n description: Whether to poll remote storage for layers to download. If false, secondary locations don't download anything.\n ArchivalConfigRequest:\n type: object\n required:\n - state\n properties:\n state:\n description: The archival state of a timeline\n type: string\n enum: ["Archived", "Unarchived"]\n TenantConfig:\n type: object\n properties:\n gc_period:\n type: string\n gc_horizon:\n type: integer\n pitr_interval:\n type: string\n checkpoint_distance:\n type: integer\n checkpoint_timeout:\n type: string\n compaction_target_size:\n type: integer\n compaction_period:\n type: string\n compaction_threshold:\n type: string\n compaction_upper_limit:\n type: string\n image_creation_threshold:\n type: integer\n walreceiver_connect_timeout:\n type: string\n lagging_wal_timeout:\n type: string\n max_lsn_wal_lag:\n type: integer\n heatmap_period:\n type: string\n TenantConfigResponse:\n type: object\n properties:\n tenant_specific_overrides:\n $ref: "#/components/schemas/TenantConfig"\n effective_config:\n $ref: "#/components/schemas/TenantConfig"\n TimelineCreateRequestImportPgdata:\n type: object\n required:\n - location\n - idempotency_key\n properties:\n idempotency_key:\n type: string\n location:\n $ref: "#/components/schemas/TimelineCreateRequestImportPgdataLocation"\n TimelineCreateRequestImportPgdataLocation:\n type: object\n properties:\n AwsS3:\n $ref: "#/components/schemas/TimelineCreateRequestImportPgdataLocationAwsS3"\n TimelineCreateRequestImportPgdataLocationAwsS3:\n type: object\n properties:\n region:\n type: string\n bucket:\n type: string\n key:\n type: string\n required:\n - region\n - bucket\n - key\n TimelineInfo:\n type: object\n required:\n - timeline_id\n - tenant_id\n - last_record_lsn\n - disk_consistent_lsn\n - state\n - min_readable_lsn\n properties:\n timeline_id:\n type: string\n format: hex\n tenant_id:\n type: string\n last_record_lsn:\n type: string\n format: hex\n disk_consistent_lsn:\n type: string\n format: hex\n remote_consistent_lsn:\n type: string\n format: hex\n remote_consistent_lsn_visible:\n type: string\n format: hex\n ancestor_timeline_id:\n type: string\n format: hex\n ancestor_lsn:\n type: string\n format: hex\n prev_record_lsn:\n type: string\n format: hex\n current_logical_size:\n type: integer\n current_physical_size:\n type: integer\n wal_source_connstr:\n type: string\n last_received_msg_lsn:\n type: string\n format: hex\n last_received_msg_ts:\n type: integer\n state:\n type: string\n min_readable_lsn:\n type: string\n format: hex\n applied_gc_cutoff_lsn:\n type: string\n format: hex\n safekeepers:\n $ref: "#/components/schemas/TimelineSafekeepersInfo"\n\n TimelineSafekeepersInfo:\n type: object\n required:\n - tenant_id\n - timeline_id\n - generation\n - safekeepers\n properties:\n tenant_id:\n type: string\n format: hex\n timeline_id:\n type: string\n format: hex\n generation:\n type: integer\n safekeepers:\n type: array\n items:\n $ref: "#/components/schemas/TimelineSafekeeperInfo"\n\n TimelineSafekeeperInfo:\n type: object\n required:\n - id\n - hostname\n properties:\n id:\n type: integer\n hostname:\n type: string\n\n SyntheticSizeResponse:\n type: object\n required:\n - id\n - size\n - segment_sizes\n - inputs\n properties:\n id:\n type: string\n format: hex\n size:\n type: integer\n nullable: true\n description: |\n Size metric in bytes or null if inputs_only=true was given.\n segment_sizes:\n type: array\n items:\n $ref: "#/components/schemas/SegmentSize"\n inputs:\n type: object\n properties:\n segments:\n type: array\n items:\n $ref: "#/components/schemas/SegmentData"\n timeline_inputs:\n type: array\n items:\n $ref: "#/components/schemas/TimelineInput"\n\n SegmentSize:\n type: object\n required:\n - method\n - accum_size\n properties:\n method:\n type: string\n accum_size:\n type: integer\n\n SegmentData:\n type: object\n required:\n - segment\n properties:\n segment:\n type: object\n required:\n - lsn\n properties:\n parent:\n type: integer\n lsn:\n type: integer\n size:\n type: integer\n needed:\n type: boolean\n timeline_id:\n type: string\n format: hex\n kind:\n type: string\n\n TimelineInput:\n type: object\n required:\n - timeline_id\n properties:\n ancestor_id:\n type: string\n ancestor_lsn:\n type: string\n timeline_id:\n type: string\n format: hex\n\n LsnByTimestampResponse:\n type: object\n required:\n - lsn\n - kind\n properties:\n lsn:\n type: string\n format: hex\n kind:\n type: string\n enum: [past, present, future, nodata]\n valid_until:\n type: string\n format: date-time\n description: The expiration time of the granted lease.\n\n LsnLease:\n type: object\n required:\n - valid_until\n properties:\n valid_until:\n type: string\n format: date-time\n\n PageserverUtilization:\n type: object\n required:\n - disk_usage_bytes\n - free_space_bytes\n - utilization_score\n properties:\n disk_usage_bytes:\n type: integer\n format: int64\n minimum: 0\n description: The amount of disk space currently used.\n free_space_bytes:\n type: integer\n format: int64\n minimum: 0\n description: The amount of usable disk space left.\n utilization_score:\n type: integer\n format: int64\n minimum: 0\n maximum: 9223372036854775807\n default: 9223372036854775807\n description: |\n Lower is better score for how good this pageserver would be for the next tenant.\n The default or maximum value can be returned in situations when a proper score cannot (yet) be calculated.\n\n SecondaryProgress:\n type: object\n required:\n - heatmap_mtime\n - layers_downloaded\n - layers_total\n - bytes_downloaded\n - bytes_total\n properties:\n heatmap_mtime:\n type: string\n format: date-time\n description: Modification time of the most recently downloaded layer heatmap (RFC 3339 format)\n layers_downloaded:\n type: integer\n format: int64\n description: How many layers from the latest layer heatmap are present on disk\n bytes_downloaded:\n type: integer\n format: int64\n description: How many bytes of layer content from the latest layer heatmap are present on disk\n layers_total:\n type: integer\n format: int64\n description: How many layers were in the latest layer heatmap\n bytes_total:\n type: integer\n format: int64\n description: How many bytes of layer content were in the latest layer heatmap\n\n AncestorDetached:\n type: object\n required:\n - reparented_timelines\n properties:\n reparented_timelines:\n type: array\n description: Set of reparented timeline ids\n items:\n type: string\n format: hex\n description: TimelineId\n\n\n Error:\n type: object\n required:\n - msg\n properties:\n msg:\n type: string\n UnauthorizedError:\n type: object\n required:\n - msg\n properties:\n msg:\n type: string\n ForbiddenError:\n type: object\n required:\n - msg\n properties:\n msg:\n type: string\n ServiceUnavailableError:\n type: object\n required:\n - msg\n properties:\n msg:\n type: string\n NotFoundError:\n type: object\n required:\n - msg\n properties:\n msg:\n type: string\n ConflictError:\n type: object\n required:\n - msg\n properties:\n msg:\n type: string\n PreconditionFailedError:\n type: object\n required:\n - msg\n properties:\n msg:\n type: string\n\nsecurity:\n - JWT: []\n | dataset_sample\yaml\neondatabase_neon\pageserver\src\http\openapi_spec.yml | openapi_spec.yml | YAML | 40,996 | 0.95 | 0.024199 | 0 | vue-tools | 276 | 2024-01-20T14:09:16.231395 | GPL-3.0 | false | c14edcc499326f5e10ac2f555be0035e |
services:\n clickhouse:\n image: clickhouse/clickhouse-server\n user: "101:101"\n container_name: clickhouse\n hostname: clickhouse\n ports:\n - 127.0.0.1:8123:8123\n - 127.0.0.1:9000:9000\n | dataset_sample\yaml\neondatabase_neon\test_runner\logical_repl\clickhouse\docker-compose.yml | docker-compose.yml | YAML | 207 | 0.7 | 0 | 0 | react-lib | 863 | 2023-10-23T03:10:39.026999 | GPL-3.0 | true | b8e9c5d444e27816835d320a0e8e7570 |
services:\n zookeeper:\n image: quay.io/debezium/zookeeper:2.7\n kafka:\n image: quay.io/debezium/kafka:2.7\n environment:\n ZOOKEEPER_CONNECT: "zookeeper:2181"\n KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092\n KAFKA_BROKER_ID: 1\n KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1\n KAFKA_JMX_PORT: 9991\n ports:\n - 127.0.0.1:9092:9092\n debezium:\n image: quay.io/debezium/connect:2.7\n environment:\n BOOTSTRAP_SERVERS: kafka:9092\n GROUP_ID: 1\n CONFIG_STORAGE_TOPIC: debezium-config\n OFFSET_STORAGE_TOPIC: debezium-offset\n STATUS_STORAGE_TOPIC: debezium-status\n DEBEZIUM_CONFIG_CONNECTOR_CLASS: io.debezium.connector.postgresql.PostgresConnector\n ports:\n - 127.0.0.1:8083:8083\n | dataset_sample\yaml\neondatabase_neon\test_runner\logical_repl\debezium\docker-compose.yml | docker-compose.yml | YAML | 751 | 0.8 | 0 | 0 | react-lib | 43 | 2024-10-16T04:29:33.338791 | Apache-2.0 | true | ef02093600e41ab850cf325d0fd49052 |
name: Build and Test\n\npermissions:\n checks: write\n contents: read\n\non:\n # Allow manual triggering\n workflow_dispatch:\n # Always run on pull requests\n pull_request:\n # And on `main` when manually pushed or after merges\n paths-ignore:\n - "website/**"\n - ".vscode/**"\n - "**.md"\n push:\n branches:\n - main\n paths-ignore:\n - "website/**"\n - ".vscode/**"\n - "**.md"\n\nenv:\n CARGO_TERM_COLOR: always\n MACOSX_DEPLOYMENT_TARGET: 10.11\n\ndefaults:\n run:\n shell: bash # necessary for windows\n\njobs:\n lint:\n uses: ./.github/workflows/lint-app.yml\n\n test:\n strategy:\n fail-fast: false\n matrix:\n os: [windows-latest, macos-latest, ubuntu-latest]\n toolchain: [stable, nightly]\n runs-on: ${{ matrix.os }}\n\n steps:\n - uses: actions/checkout@v4\n\n - name: Setup toolchain\n uses: dtolnay/rust-toolchain@master\n with:\n toolchain: ${{ matrix.toolchain }}\n\n - name: Show toolchain info\n run: cargo --version --verbose\n\n - name: Install neovim\n uses: rhysd/action-setup-vim@v1\n with:\n neovim: true\n\n - name: Install dependencies (Linux)\n if: matrix.os == 'ubuntu-latest'\n run: |\n sudo apt-get update\n sudo apt-get -qq install -y \\n curl gnupg ca-certificates git gcc-multilib g++-multilib cmake \\n libssl-dev pkg-config libfreetype6-dev libasound2-dev \\n libexpat1-dev libxcb-composite0-dev libbz2-dev freeglut3-dev \\n libxi-dev libfuse2 appstream libfontconfig1-dev\n\n - name: Install Cargo Binstall\n uses: cargo-bins/cargo-binstall@main\n\n - name: Install cargo-nextest\n run: cargo binstall -y cargo-nextest\n\n - uses: Swatinem/rust-cache@v2\n\n - name: Test\n env:\n RUST_BACKTRACE: full\n run: |\n cargo nextest run --profile ci\n mv target/nextest/ci/results.xml target/nextest/ci/results-${{ matrix.os }}.xml\n\n - name: Prepare test results\n run: |\n mkdir -p test-results-${{ matrix.os }}-${{ matrix.toolchain }}\n mv target/nextest/ci/results-*.xml test-results-${{ matrix.os }}-${{ matrix.toolchain }}/\n - name: Upload test results\n uses: actions/upload-artifact@v4\n with:\n name: test-results-${{ matrix.os }}-${{ matrix.toolchain }}\n path: |\n test-results-${{ matrix.os }}-${{ matrix.toolchain }}\n\n clippy:\n strategy:\n fail-fast: false\n matrix:\n os: [windows-latest, macos-latest, ubuntu-latest]\n toolchain: [stable, nightly]\n runs-on: ${{ matrix.os }}\n\n steps:\n - uses: actions/checkout@v4\n\n - name: Setup toolchain\n uses: dtolnay/rust-toolchain@master\n with:\n toolchain: ${{ matrix.toolchain }}\n components: clippy\n\n - uses: Swatinem/rust-cache@v2\n\n - name: Show toolchain info\n run: cargo --version --verbose\n\n - name: Run Clippy\n run: cargo clippy --all-targets -- -D warnings\n continue-on-error: ${{ matrix.toolchain == 'nightly' }}\n\n event-upload:\n needs: test\n name: Upload Test Event\n runs-on: ubuntu-latest\n steps:\n - uses: actions/upload-artifact@v4\n with:\n name: test-event\n path: ${{ github.event_path }}\n\n build-deploy:\n strategy:\n fail-fast: false\n matrix:\n # NOTE: Should use the oldest available Ubuntu release, for maximum compatibility\n os: [windows-latest, macos-latest, ubuntu-22.04]\n runs-on: ${{ matrix.os }}\n\n steps:\n - uses: actions/checkout@v4\n\n - name: Setup toolchain\n uses: dtolnay/rust-toolchain@master\n with:\n toolchain: stable\n\n - name: Install Cargo Binstall\n uses: cargo-bins/cargo-binstall@main\n\n - name: Install dependencies (Windows)\n if: matrix.os == 'windows-latest'\n run: |\n if ! which cargo-wix; then cargo binstall -y cargo-wix; fi\n\n - name: Setup Ninja\n if: matrix.os == 'windows-latest'\n uses: seanmiddleditch/gha-setup-ninja@v6\n\n - name: Install dependencies (macOS)\n if: matrix.os == 'macos-latest'\n run: |\n curl -L -o create-dmg.tar.gz https://github.com/create-dmg/create-dmg/archive/refs/tags/v1.2.2.tar.gz\n tar -xzf create-dmg.tar.gz\n cd create-dmg-1.2.2\n sudo make install\n cd ..\n rustup target add x86_64-apple-darwin\n rustup target add aarch64-apple-darwin\n\n - name: Install dependencies (Linux)\n if: matrix.os == 'ubuntu-22.04'\n run: |\n sudo apt-get update\n sudo apt-get -qq install -y \\n curl gnupg ca-certificates git gcc-multilib g++-multilib cmake \\n libssl-dev pkg-config libfreetype6-dev libasound2-dev \\n libexpat1-dev libxcb-composite0-dev libbz2-dev freeglut3-dev \\n libxi-dev libfuse2 appstream\n\n - name: Install neovim\n uses: rhysd/action-setup-vim@v1\n with:\n neovim: true\n\n - uses: Swatinem/rust-cache@v2\n\n - name: Build (Windows)\n if: matrix.os == 'windows-latest'\n env:\n RUSTFLAGS: "-Ctarget-feature=+crt-static" \n # The file paths are to long, so we need to vendor the dependencies\n run: |\n mkdir .cargo\n cargo vendor ../c > .cargo/config.toml\n cargo wix --nocapture --output target/release/neovide.msi --package neovide\n\n - name: Build (macOS)\n if: matrix.os == 'macos-latest'\n run: |\n # x86\n cargo build --locked --release --target=x86_64-apple-darwin\n # arch\n cargo build --locked --release --target=aarch64-apple-darwin\n\n - name: Build (Linux)\n if: matrix.os == 'ubuntu-22.04'\n run: cargo build --locked --release\n\n - name: create Neovide.app (macOS only)\n if: matrix.os == 'macos-latest'\n run: |\n # create the .app only, fix the arguments later\n GENERATE_BUNDLE_APP=true GENERATE_DMG=false ./macos-builder/run aarch64-apple-darwin\n GENERATE_BUNDLE_APP=true GENERATE_DMG=false ./macos-builder/run x86_64-apple-darwin\n\n - name: Write Apple signing key to a file (macOS only)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n env:\n APPLE_SIGNING_KEY_P12: ${{ secrets.APPLE_SIGNING_KEY_P12 }}\n run: echo "$APPLE_SIGNING_KEY_P12" | base64 -d -o key.p12\n\n - name: Write App Store Connect API key to a file (macOS only)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n env:\n APP_STORE_CONNECT_API_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY }}\n run: echo "$APP_STORE_CONNECT_API_KEY" > app_store_connect_api_key.json\n\n - name: Sign Mac App binary root (aarch64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n with:\n input_path: target/aarch64-apple-darwin/release/neovide\n p12_file: key.p12\n p12_password: ${{ secrets.APPLE_SIGNING_KEY_PASSWORD }}\n sign: true\n sign_args: "--code-signature-flags=runtime"\n\n - name: Sign Mac App binary (aarch64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n with:\n input_path: target/aarch64-apple-darwin/release/bundle/osx/Neovide.app/Contents/MacOS/neovide\n p12_file: key.p12\n p12_password: ${{ secrets.APPLE_SIGNING_KEY_PASSWORD }}\n sign: true\n sign_args: "--code-signature-flags=runtime"\n\n - name: Sign Mac App .app (aarch64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n with:\n input_path: target/aarch64-apple-darwin/release/bundle/osx/Neovide.app\n p12_file: key.p12\n p12_password: ${{ secrets.APPLE_SIGNING_KEY_PASSWORD }}\n sign: true\n sign_args: "--code-signature-flags=runtime"\n\n - name: Sign Mac App binary root (x86_64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n with:\n input_path: target/x86_64-apple-darwin/release/neovide\n p12_file: key.p12\n p12_password: ${{ secrets.APPLE_SIGNING_KEY_PASSWORD }}\n sign: true\n sign_args: "--code-signature-flags=runtime"\n\n - name: Sign Mac App binary (x86_64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n with:\n input_path: target/x86_64-apple-darwin/release/bundle/osx/Neovide.app/Contents/MacOS/neovide\n p12_file: key.p12\n p12_password: ${{ secrets.APPLE_SIGNING_KEY_PASSWORD }}\n sign: true\n sign_args: "--code-signature-flags=runtime"\n\n - name: Sign Mac App .app (x86_64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n with:\n input_path: target/x86_64-apple-darwin/release/bundle/osx/Neovide.app\n p12_file: key.p12\n p12_password: ${{ secrets.APPLE_SIGNING_KEY_PASSWORD }}\n sign: true\n sign_args: "--code-signature-flags=runtime"\n\n - name: Prepare Artifacts (Windows)\n if: matrix.os == 'windows-latest'\n run: |\n echo "ARTIFACT=neovide.exe" >> $GITHUB_ENV\n echo "ARTIFACT2=neovide.msi" >> $GITHUB_ENV\n\n - name: Prepare Artifacts (macOS)\n if: matrix.os == 'macos-latest'\n run: |\n cd $GITHUB_WORKSPACE\n # create .dmg for x86_64-apple-darwin\n GENERATE_BUNDLE_APP=false GENERATE_DMG=true ./macos-builder/run x86_64-apple-darwin\n\n # create .dmg for aarch64-apple-darwin\n GENERATE_BUNDLE_APP=false GENERATE_DMG=true ./macos-builder/run aarch64-apple-darwin\n\n echo "ARTIFACT4=Neovide-x86_64-apple-darwin.dmg" >> $GITHUB_ENV\n echo "ARTIFACT5=Neovide-aarch64-apple-darwin.dmg" >> $GITHUB_ENV\n\n - name: Prepare Artifacts (Linux)\n if: matrix.os == 'ubuntu-22.04'\n run: |\n cd target/release\n # archive artifact\n strip neovide\n tar czvf neovide-linux-x86_64.tar.gz neovide\n # create appimage\n curl -Lo linuxdeploy https://github.com/linuxdeploy/linuxdeploy/releases/latest/download/linuxdeploy-x86_64.AppImage\n chmod +x linuxdeploy\n curl -Lo linuxdeploy-plugin-appimage https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/latest/download/linuxdeploy-plugin-appimage-x86_64.AppImage\n chmod +x linuxdeploy-plugin-appimage\n\n export LDAI_OUTPUT=neovide.AppImage\n export LDAI_UPDATE_INFORMATION="gh-releases-zsync|neovide|neovide|latest|neovide.AppImage.zsync"\n ./linuxdeploy \\n --executable=neovide \\n --desktop-file=../../assets/neovide.desktop \\n --appdir=AppDir \\n --icon-file=../../assets/neovide.svg \\n --output=appimage\n\n echo "ARTIFACT=neovide-linux-x86_64.tar.gz" >> $GITHUB_ENV\n echo "ARTIFACT2=neovide.AppImage" >> $GITHUB_ENV\n echo "ARTIFACT3=neovide.AppImage.zsync" >> $GITHUB_ENV\n\n - name: Sign Mac App .dmg (aarch64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n with:\n input_path: target/aarch64-apple-darwin/release/bundle/osx/Neovide-aarch64-apple-darwin.dmg\n p12_file: key.p12\n p12_password: ${{ secrets.APPLE_SIGNING_KEY_PASSWORD }}\n sign: true\n sign_args: "--code-signature-flags=runtime"\n\n - name: Sign Mac App .dmg (x86_64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n with:\n input_path: target/x86_64-apple-darwin/release/bundle/osx/Neovide-x86_64-apple-darwin.dmg\n p12_file: key.p12\n p12_password: ${{ secrets.APPLE_SIGNING_KEY_PASSWORD }}\n sign: true\n sign_args: "--code-signature-flags=runtime"\n\n - name: Notarize signed macOS (aarch64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n continue-on-error: true\n with:\n input_path: target/aarch64-apple-darwin/release/bundle/osx/Neovide-aarch64-apple-darwin.dmg\n sign: false\n notarize: true\n staple: true\n app_store_connect_api_key_json_file: app_store_connect_api_key.json\n\n - name: Notarize signed macOS (x86_64-apple-darwin)\n if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'\n uses: indygreg/apple-code-sign-action@v1\n continue-on-error: true\n with:\n input_path: target/x86_64-apple-darwin/release/bundle/osx/Neovide-x86_64-apple-darwin.dmg\n sign: false\n notarize: true\n staple: true\n app_store_connect_api_key_json_file: app_store_connect_api_key.json\n\n - if: env.ARTIFACT\n uses: actions/upload-artifact@v4\n with:\n name: ${{ env.ARTIFACT }}\n path: target/release/${{ env.ARTIFACT }}\n\n - if: env.ARTIFACT2\n uses: actions/upload-artifact@v4\n with:\n name: ${{ env.ARTIFACT2 }}\n path: target/release/${{ env.ARTIFACT2 }}\n\n - if: env.ARTIFACT3\n uses: actions/upload-artifact@v4\n with:\n name: ${{ env.ARTIFACT3 }}\n path: target/release/${{ env.ARTIFACT3 }}\n\n - if: env.ARTIFACT4\n uses: actions/upload-artifact@v4\n with:\n name: ${{ env.ARTIFACT4 }}\n path: target/x86_64-apple-darwin/release/bundle/osx/${{ env.ARTIFACT4 }}\n\n - if: env.ARTIFACT5\n uses: actions/upload-artifact@v4\n with:\n name: ${{ env.ARTIFACT5 }}\n path: target/aarch64-apple-darwin/release/bundle/osx/${{ env.ARTIFACT5 }}\n | dataset_sample\yaml\neovide_neovide\.github\workflows\build.yml | build.yml | YAML | 14,313 | 0.8 | 0.083951 | 0.034884 | python-kit | 445 | 2025-02-04T22:01:14.138683 | BSD-3-Clause | false | 2856345c4a0003e72b465b450b39278c |
name: Lint App\n\npermissions:\n checks: write\n contents: read\n\non:\n workflow_call:\n\nenv:\n CARGO_TERM_COLOR: always\n\njobs:\n rustfmt:\n runs-on: ubuntu-latest\n\n steps:\n - uses: actions/checkout@v4\n\n - name: Run rustfmt\n run: cargo fmt --all --check\n | dataset_sample\yaml\neovide_neovide\.github\workflows\lint-app.yml | lint-app.yml | YAML | 272 | 0.7 | 0 | 0 | python-kit | 738 | 2025-01-12T06:39:52.998057 | Apache-2.0 | false | b018cd652b40867e78060f1f681c1660 |
name: Lint Website\n\npermissions:\n contents: read\n\non:\n push:\n paths:\n - ".github/workflows/lint-website.yml"\n - "website/**/*.md"\n pull_request:\n paths:\n - ".github/workflows/lint-website.yml"\n - "website/**/*.md"\n\njobs:\n lint:\n name: Lint website\n runs-on: ubuntu-latest\n\n steps:\n - uses: actions/checkout@v4\n\n - name: Lint markdown\n uses: nosborn/github-action-markdown-cli@v3.1.0\n with:\n files: ./website\n config_file: ./website/.markdownlintrc\n | dataset_sample\yaml\neovide_neovide\.github\workflows\lint-website.yml | lint-website.yml | YAML | 529 | 0.8 | 0 | 0 | react-lib | 812 | 2024-03-14T18:44:44.601414 | Apache-2.0 | false | e2e866fda243f744dc1dd0ff89ddbe65 |
name: Check Frozen Release Builds\n\npermissions:\n contents: read\n\non:\n release:\n types: [published]\n\njobs:\n check-frozen:\n runs-on: ubuntu-latest\n\n steps:\n - uses: actions/checkout@v4\n\n - name: Fetch dependencies\n run: cargo fetch\n\n - name: Build\n run: cargo build --frozen\n | dataset_sample\yaml\neovide_neovide\.github\workflows\release-check-frozen.yml | release-check-frozen.yml | YAML | 314 | 0.7 | 0 | 0 | vue-tools | 505 | 2024-06-22T11:46:08.526667 | GPL-3.0 | false | 81867e7516ad539caf9dc265bc52b713 |
name: Releases\n\npermissions:\n contents: read\n secrets: read\n\non:\n workflow_dispatch:\n inputs:\n logLevel:\n description: "Log level"\n required: true\n default: "warning"\n\njobs:\n snap:\n runs-on: ubuntu-20.04\n\n steps:\n - name: Check out Git repository\n uses: actions/checkout@v4\n\n - uses: snapcore/action-build@v1\n env:\n SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY: 6G\n id: snapcraft\n\n - uses: actions/upload-artifact@v4\n with:\n name: snap\n path: ${{ steps.snapcraft.outputs.snap }}\n\n - uses: snapcore/action-publish@v1\n with:\n store_login: ${{ secrets.SNAPCRAFT_TOKEN }}\n snap: ${{ steps.snapcraft.outputs.snap }}\n | dataset_sample\yaml\neovide_neovide\.github\workflows\release.yml | release.yml | YAML | 740 | 0.85 | 0 | 0 | node-utils | 462 | 2023-12-10T17:33:49.074146 | BSD-3-Clause | false | 9e5eba02d1ec2071c94f06801decb70d |
name: Build and Publish Website\n\non:\n push:\n paths:\n - ".github/workflows/website.yml"\n - "website/**"\n - "!website/README.md"\n\njobs:\n build:\n name: Build Website\n runs-on: ubuntu-latest\n env:\n MDBOOK-VERSION: v0.4.21\n MDBOOK-PAGETOC-VERSION: v0.1.4\n MDBOOK-LINKCHECK-VERSION: v0.7.6\n CARGO_TERM_COLOR: always\n\n steps:\n - name: Checkout Repository\n uses: actions/checkout@v4\n\n - name: Restore mdBook Cache\n id: cache-mdbook\n uses: actions/cache@v4\n with:\n path: ./mdbook\n key: mdbook-${{ env.MDBOOK-VERSION }}\n\n - name: Install mdbook\n if: steps.cache-mdbook.outputs.cache-hit != 'true'\n run: |\n mkdir mdbook\n curl -sSL https://github.com/rust-lang/mdBook/releases/download/${{ env.MDBOOK-VERSION }}/mdbook-${{ env.MDBOOK-VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook\n\n - name: Restore mdbook-pagetoc Cache\n id: cache-mdbook-pagetoc\n uses: actions/cache@v4\n with:\n path: ./mdbook-pagetoc\n key: mdbook-pagetoc-${{ env.MDBOOK-PAGETOC-VERSION }}\n\n - name: Install mdbook-pagetoc\n if: steps.cache-mdbook-pagetoc.outputs.cache-hit != 'true'\n run: |\n mkdir mdbook-pagetoc\n curl -sSL https://github.com/slowsage/mdbook-pagetoc/releases/download/${{ env.MDBOOK-PAGETOC-VERSION }}/mdbook-pagetoc-${{ env.MDBOOK-PAGETOC-VERSION }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-pagetoc\n\n - name: Restore mdbook-linkcheck Cache\n id: cache-mdbook-linkcheck\n uses: actions/cache@v4\n with:\n path: ./mdbook-linkcheck\n key: mdbook-linkcheck-${{ env.MDBOOK-LINKCHECK-VERSION }}\n\n - name: Install mdbook-linkcheck\n if: steps.cache-mdbook-linkcheck.outputs.cache-hit != 'true'\n run: |\n mkdir mdbook-linkcheck && cd "$_"\n curl -sSL https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/${{ env.MDBOOK-LINKCHECK-VERSION }}/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -o mdbook-linkcheck.zip\n unzip mdbook-linkcheck.zip\n chmod +x mdbook-linkcheck\n\n - name: Update PATH\n run: |\n echo `pwd`/mdbook >> $GITHUB_PATH\n echo `pwd`/mdbook-pagetoc >> $GITHUB_PATH\n echo `pwd`/mdbook-linkcheck >> $GITHUB_PATH\n\n - name: Build Book\n run: mdbook build\n working-directory: ./website\n\n - name: Store HTML\n if: ${{ github.ref == 'refs/heads/main' }}\n uses: actions/upload-artifact@v4\n with:\n name: book\n path: ./website/book\n\n sitemap:\n if: ${{ github.ref == 'refs/heads/main' }}\n name: Generate Sitemap\n needs: build\n runs-on: ubuntu-latest\n env:\n STATIC-SITEMAP-CLI-VERSION: 2.1.2\n\n steps:\n - name: Download HTML\n uses: actions/download-artifact@v4\n with:\n name: book\n path: ./book\n\n # Unsure how to cache NPM\n - name: Install Static Sitemap CLI\n run: |\n npm install npx\n npm install static-sitemap-cli@${{ env.STATIC-SITEMAP-CLI-VERSION }}\n\n - name: Generate Sitemap\n run: |\n cd ./book/html\n npx sscli --base https://neovide.dev\n\n - name: Store Sitemap\n uses: actions/upload-artifact@v4\n with:\n name: sitemap\n path: ./book/html/sitemap.xml\n\n publish:\n if: ${{ github.ref == 'refs/heads/main' }}\n name: Publish Website\n needs: sitemap\n runs-on: ubuntu-latest\n\n steps:\n - name: Download HTML & Sitemap\n uses: actions/download-artifact@v4\n\n - name: Move Sitemap Into HTML\n run: mv ./sitemap/sitemap.xml ./book/html\n\n - name: Publish to GitHub Pages\n uses: peaceiris/actions-gh-pages@v3\n with:\n github_token: ${{ secrets.GITHUB_TOKEN }}\n publish_dir: ./book/html\n | dataset_sample\yaml\neovide_neovide\.github\workflows\website.yml | website.yml | YAML | 3,954 | 0.8 | 0.045802 | 0.009091 | node-utils | 926 | 2024-11-12T11:55:03.765203 | BSD-3-Clause | false | 5e57e78c3da0ed3823ccf13fe2eb34c3 |
# SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n# SPDX-License-Identifier: AGPL-3.0-or-later\ncodecov:\n branch: master\n ci:\n - drone.nextcloud.com\n - '!scrutinizer-ci.com'\n\ncomment: false\n\n# Ignore project status check as our CI only runs PHP tests for PHP PRs and JS tests for JS PRs\n# Otherwise it will warn about project coverage drops\ncoverage:\n status:\n project: off\n patch: off\n | dataset_sample\yaml\nextcloud_server\codecov.yml | codecov.yml | YAML | 419 | 0.8 | 0.125 | 0.285714 | awesome-app | 112 | 2023-12-30T07:00:51.308683 | GPL-3.0 | false | 03f533d18f0a9b541c1d96aa7093a646 |
version: 5.0.0-{build} # Only change for mayor versions (e.g. 6.0)\nimage:\n - Visual Studio 2022\n - Ubuntu2004\nconfiguration: Release\nbuild: false\ntest: false\nskip_tags: true\nskip_branch_with_pr: true\n\nnuget:\n disable_publish_on_pr: true\n\nmatrix:\n fast_finish: true\n\nfor:\n -\n matrix:\n only:\n - image: Visual Studio 2022\n init:\n - net start MSSQL$SQL2019\n environment:\n DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true\n github_auth_token:\n secure: WYvd/k1xGCsDS+4iOhjzxA5/e36RjkxnuVOHpBR+eDtZNNjpYydCyNfd1COME9jI\n sonar_token:\n secure: OUI/jCbBF75TwKMPT+IfewdgwCgx9nQkRg3cYOEQNJeX5J2++oWS3dmpwO51XduP\n build_script:\n - ps: ./build.ps1\n test_script:\n - msbuild /t:rebuild .\tools\CheckSourceCode\src\ /p:Configuration=Release /verbosity:minimal\n - tools\CheckSourceCode\NLog.SourceCodeTests.exe no-interactive\n - ps: if (./Test-XmlFile.ps1) { Write-Output "Valid XSD" } else { exit 400 }\n - ps: ./run-tests.ps1\n deploy:\n - provider: NuGet\n api_key:\n secure: ACKSV1ixxNpO+2k8KvNDy6hd9QmR8lkQmKn773ZIIeVpG0ywYUhY4j8LcyykVR1a\n on:\n branch: master\n - provider: NuGet\n api_key:\n secure: ACKSV1ixxNpO+2k8KvNDy6hd9QmR8lkQmKn773ZIIeVpG0ywYUhY4j8LcyykVR1a\n on:\n branch: dev\n artifacts:\n - path: 'artifacts\*.nupkg'\n type: NuGetPackage\n - path: 'artifacts\*.snupkg'\n type: NuGetPackage\n\n -\n matrix:\n only:\n - image: Ubuntu2004\n environment:\n DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true\n FrameworkPathOverride: /usr/lib/mono/4.6.1-api/\n build_script:\n - ps: dotnet --version\n test_script:\n - ps: ./run-tests.ps1\n | dataset_sample\yaml\NLog_NLog\appveyor.yml | appveyor.yml | YAML | 1,685 | 0.8 | 0.046875 | 0 | awesome-app | 614 | 2023-12-15T14:15:42.164607 | MIT | false | 0d099d85cc1a9f65b66a7336ce4692d0 |
# Configuration for welcome - https://github.com/behaviorbot/welcome\n\n# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome\n\n# Comment to be posted to on first time issues\nnewIssueWelcomeComment: >\n Hi! Thanks for opening your first issue here! Please make sure to follow the issue template - so we could help you better!\n\n# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome\n\n# Comment to be posted to on PRs from first time contributors in your repository\nnewPRWelcomeComment: >\n Thanks for opening this pull request!\n \n We will try to review this soon! Please note that pull requests with unit tests are earlier accepted :angel:\n\n# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge\n\n# Comment to be posted to on pull requests merged by a first time user\nfirstPRMergeComment: >\n Hooray your first pull request is merged! Thanks for the contribution! Looking for more? :angel: Please check the [up-for-grabs issues](https://github.com/NLog/NLog/issues?q=is%3Aopen+is%3Aissue+label%3Aup-for-grabs) - thanks!\n \n \n\n# It is recommend to include as many gifs and emojis as possible\n | dataset_sample\yaml\NLog_NLog\.github\config.yml | config.yml | YAML | 1,225 | 0.8 | 0.44 | 0.5 | react-lib | 349 | 2023-11-26T15:17:50.096350 | GPL-3.0 | false | d38b96bbdd3a0fd112638a5edb3a0a05 |
version: 2\nupdates:\n\n- package-ecosystem: nuget\n directory: "/tests/NLog.UnitTests"\n schedule:\n interval: daily\n open-pull-requests-limit: 10\n | dataset_sample\yaml\NLog_NLog\.github\dependabot.yml | dependabot.yml | YAML | 149 | 0.7 | 0 | 0 | awesome-app | 112 | 2024-05-17T10:10:01.198458 | BSD-3-Clause | false | 2ee0eb270d0112cdd54fa3444ee61d48 |
merges:\n - action: delete_branch\nlabels:\n 'needs info':\n action: close\n delay: 7 days\n comment: "Please add the requested info, so we could help you better! (This issue will be closed in 7 days)"\n | dataset_sample\yaml\NLog_NLog\.github\ranger.yml | ranger.yml | YAML | 207 | 0.7 | 0 | 0 | python-kit | 58 | 2024-07-29T05:58:07.410626 | Apache-2.0 | false | 2b1a4458f90b71e9df320ce61309c8be |
blank_issues_enabled: false\ncontact_links:\n - name: Have a question β\n url: https://stackoverflow.com/tags/nlog\n about: Use the NLog-tag when asking questions at StackOverflow.com | dataset_sample\yaml\NLog_NLog\.github\ISSUE_TEMPLATE\config.yml | config.yml | YAML | 188 | 0.8 | 0 | 0 | vue-tools | 385 | 2023-10-05T21:34:30.548796 | MIT | false | a210b0ed9b29c3c82927cfbc6f42c634 |
services:\n nopcommerce_web:\n build: .\n container_name: nopcommerce\n ports:\n - "80:80"\n depends_on:\n - nopcommerce_database\n nopcommerce_database:\n image: "mcr.microsoft.com/mssql/server:2019-latest"\n container_name: nopcommerce_mssql_server\n environment:\n SA_PASSWORD: "nopCommerce_db_password"\n ACCEPT_EULA: "Y"\n MSSQL_PID: "Express"\n\nvolumes:\n nopcommerce_data: | dataset_sample\yaml\nopSolutions_nopCommerce\docker-compose.yml | docker-compose.yml | YAML | 486 | 0.7 | 0 | 0 | node-utils | 292 | 2025-05-19T03:18:06.980832 | MIT | false | 91b9b31c9f1b5c99ac401c202fc9ef64 |
services:\n nopcommerce_web:\n build: .\n container_name: nopcommerce\n ports:\n - "80:80"\n depends_on:\n - nopcommerce_database\n nopcommerce_database:\n image: "mysql:latest"\n container_name: nopcommerce_mysql_server\n restart: "always"\n environment:\n MYSQL_ROOT_PASSWORD: "nopCommerce_db_password"\n\nvolumes:\n nopcommerce_data: | dataset_sample\yaml\nopSolutions_nopCommerce\mysql-docker-compose.yml | mysql-docker-compose.yml | YAML | 426 | 0.7 | 0 | 0 | react-lib | 835 | 2024-03-05T04:19:06.647916 | MIT | false | ca31bda81ac65f05ffc2a01a3f58e35c |
services:\n nopcommerce_web:\n build: .\n container_name: nopcommerce\n ports:\n - "80:80"\n depends_on:\n - nopcommerce_database\n nopcommerce_database:\n image: "postgres:latest"\n container_name: nopcommerce_postgres_server\n restart: "always"\n environment:\n POSTGRES_PASSWORD: "nopCommerce_db_password"\n\nvolumes:\n nopcommerce_data: | dataset_sample\yaml\nopSolutions_nopCommerce\postgresql-docker-compose.yml | postgresql-docker-compose.yml | YAML | 430 | 0.7 | 0 | 0 | node-utils | 714 | 2024-03-21T05:27:22.380639 | MIT | false | bdc63199a49348a733c364a1b73e7d11 |
codecov:\n notify:\n require_ci_to_pass: no\n after_n_builds: 1\ncoverage:\n status:\n project:\n default:\n informational: true\n patch:\n default:\n informational: true\n changes: false\ncomment: off\n | dataset_sample\yaml\numpy_numpy\.codecov.yml | .codecov.yml | YAML | 230 | 0.85 | 0 | 0 | vue-tools | 710 | 2023-10-13T02:10:20.982990 | GPL-3.0 | false | 03b74b4cea7c1d29de101e463dbbcafb |
trigger:\n # start a new build for every push\n batch: False\n branches:\n include:\n - main\n - maintenance/*\n\n\npr:\n branches:\n include:\n - '*' # must quote since "*" is a YAML reserved character; we want a string\n\n\nstages:\n\n- stage: Check\n jobs:\n - job: Skip\n pool:\n vmImage: 'ubuntu-22.04'\n variables:\n DECODE_PERCENTS: 'false'\n RET: 'true'\n steps:\n - bash: |\n git_log=`git log --max-count=1 --skip=1 --pretty=format:"%B" | tr "\n" " "`\n echo "##vso[task.setvariable variable=log]$git_log"\n - bash: echo "##vso[task.setvariable variable=RET]false"\n condition: or(contains(variables.log, '[skip azp]'), contains(variables.log, '[azp skip]'), contains(variables.log, '[skip ci]'), contains(variables.log, '[ci skip]'))\n - bash: echo "##vso[task.setvariable variable=start_main;isOutput=true]$RET"\n name: result\n\n- stage: ComprehensiveTests\n condition: and(succeeded(), eq(dependencies.Check.outputs['Skip.result.start_main'], 'true'))\n dependsOn: Check\n jobs:\n\n - job: Lint\n condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))\n pool:\n vmImage: 'ubuntu-22.04'\n steps:\n - task: UsePythonVersion@0\n inputs:\n versionSpec: '3.11'\n addToPath: true\n architecture: 'x64'\n - script: >-\n python -m pip install -r requirements/linter_requirements.txt\n displayName: 'Install tools'\n # pip 21.1 emits a pile of garbage messages to annoy users :)\n # failOnStderr: true\n - script: |\n python tools/linter.py\n displayName: 'Run Lint Checks'\n failOnStderr: true\n\n - job: Linux_Python_311_32bit_full_with_asserts\n pool:\n vmImage: 'ubuntu-22.04'\n steps:\n - script: |\n git submodule update --init\n displayName: 'Fetch submodules'\n - script: |\n # There are few options for i686 images at https://quay.io/organization/pypa,\n # use the glibc2.17 one (manylinux2014)\n docker run -v $(pwd):/numpy -e CFLAGS="-msse2 -std=c99 -UNDEBUG" \\n -e F77=gfortran-5 -e F90=gfortran-5 quay.io/pypa/manylinux2014_i686 \\n /bin/bash -xc "source /numpy/tools/ci/run_32_bit_linux_docker.sh"\n displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'\n\n - job: Windows\n timeoutInMinutes: 120\n pool:\n vmImage: 'windows-2019'\n strategy:\n maxParallel: 3\n matrix:\n Python311-64bit-fast:\n PYTHON_VERSION: '3.11'\n PYTHON_ARCH: 'x64'\n TEST_MODE: fast\n BITS: 64\n Python312-64bit-full:\n PYTHON_VERSION: '3.12'\n PYTHON_ARCH: 'x64'\n TEST_MODE: full\n BITS: 64\n _USE_BLAS_ILP64: '1'\n# TODO pypy: uncomment when pypy3.11 comes out\n# PyPy311-64bit-fast:\n# PYTHON_VERSION: 'pypy3.11'\n# PYTHON_ARCH: 'x64'\n# TEST_MODE: fast\n# BITS: 64\n# _USE_BLAS_ILP64: '1'\n\n steps:\n - template: azure-steps-windows.yml\n | dataset_sample\yaml\numpy_numpy\azure-pipelines.yml | azure-pipelines.yml | YAML | 3,072 | 0.95 | 0.019608 | 0.130435 | react-lib | 727 | 2023-08-10T00:01:20.620102 | GPL-3.0 | false | 2b0e57a764416731da59c6b7dea1124c |
steps:\n- script: git submodule update --init\n displayName: 'Fetch submodules'\n- task: UsePythonVersion@0\n inputs:\n versionSpec: $(PYTHON_VERSION)\n addToPath: true\n architecture: $(PYTHON_ARCH)\n\n- script: python -m pip install --upgrade pip wheel\n displayName: 'Install tools'\n\n- script: python -m pip install -r requirements/test_requirements.txt\n displayName: 'Install dependencies; some are optional to avoid test skips'\n\n- powershell: |\n choco install -y --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite\n displayName: 'Install utilities'\n\n- powershell: |\n # Note: ensure the `pip install .` command remains the last one here,\n # to avoid "green on failure" issues\n If ( Test-Path env:DISABLE_BLAS ) {\n python -m pip install . -v -Csetup-args="--vsenv" -Csetup-args="-Dblas=none" -Csetup-args="-Dlapack=none" -Csetup-args="-Dallow-noblas=true"\n }\n elseif ( Test-Path env:_USE_BLAS_ILP64 ) {\n pip install -r requirements/ci_requirements.txt\n spin config-openblas --with-scipy-openblas=64\n $env:PKG_CONFIG_PATH="$pwd/.openblas"\n python -m pip install . -v -Csetup-args="--vsenv"\n } else {\n pip install -r requirements/ci_requirements.txt\n spin config-openblas --with-scipy-openblas=32\n $env:PKG_CONFIG_PATH="$pwd/.openblas"\n python -m pip install . -v -Csetup-args="--vsenv" \n }\n displayName: 'Build NumPy'\n\n- powershell: |\n cd tools # avoid root dir to not pick up source tree\n # Get a gfortran onto the path for f2py tests\n $env:PATH = "c:\\rtools43\\x86_64-w64-mingw32.static.posix\\bin;$env:PATH"\n If ( $env:TEST_MODE -eq "full" ) {\n pytest --pyargs numpy -rsx --junitxml=junit/test-results.xml\n } else {\n pytest --pyargs numpy -m "not slow" -rsx --junitxml=junit/test-results.xml\n }\n displayName: 'Run NumPy Test Suite'\n\n- task: PublishTestResults@2\n condition: succeededOrFailed()\n inputs:\n testResultsFiles: '**/test-*.xml'\n failTaskOnFailedTests: true\n testRunTitle: 'Publish test results for Python $(PYTHON_VERSION) $(BITS)-bit $(TEST_MODE) Windows'\n | dataset_sample\yaml\numpy_numpy\azure-steps-windows.yml | azure-steps-windows.yml | YAML | 2,133 | 0.95 | 0.036364 | 0.061224 | awesome-app | 939 | 2024-10-21T03:21:55.940071 | GPL-3.0 | false | 2618a4a65ab26711b596ee584141f212 |
# To use:\n#\n# $ conda env create -f environment.yml # `mamba` works too for this command\n# $ conda activate numpy-dev\n#\nname: numpy-dev\nchannels:\n - conda-forge\ndependencies:\n - python=3.12 # need to pin to avoid issues with builds\n - cython>=3.0\n - compilers\n - openblas\n - nomkl\n - setuptools==65.5.1\n - ninja\n - pkg-config\n - meson-python\n - spin==0.13\n - ccache\n # For testing\n - pytest\n - pytest-cov\n - pytest-xdist\n - hypothesis\n # For type annotations\n - typing_extensions>=4.5.0\n - mypy=1.15.0\n - orjson # makes mypy faster\n # For building docs\n - sphinx>=4.5.0\n - sphinx-copybutton\n - sphinx-design\n - numpydoc=1.4.0\n - ipython\n - scipy\n - pandas\n - matplotlib\n - pydata-sphinx-theme>=0.15.2\n - doxygen\n - towncrier\n - jupyterlite-sphinx>=0.18.0\n # see https://github.com/jupyterlite/pyodide-kernel#compatibility\n - jupyterlite-pyodide-kernel==0.5.2 # supports Pyodide 0.27.1\n # NOTE: breathe 4.33.0 collides with sphinx.ext.graphviz\n - breathe>4.33.0\n # For linting\n - ruff=0.8.3\n - gitpython\n # Used in some tests\n - cffi\n - pytz\n | dataset_sample\yaml\numpy_numpy\environment.yml | environment.yml | YAML | 1,092 | 0.8 | 0.019231 | 0.230769 | awesome-app | 792 | 2024-12-21T07:41:49.542851 | Apache-2.0 | false | 7a334534ecbe53140c4981253d99eb4d |
# Python CircleCI 2.1 configuration file\n#\n# Check https://circleci.com/docs/2.1/language-python/ for more details\n#\nversion: 2.1\n\n# Aliases to reuse\n_defaults: &defaults\n docker:\n # CircleCI maintains a library of pre-built images\n # documented at https://circleci.com/developer/images/image/cimg/python\n - image: cimg/python:3.11.10\n working_directory: ~/repo\n\n\njobs:\n build:\n <<: *defaults\n steps:\n - checkout\n\n - run:\n name: check skip\n command: |\n export git_log=$(git log --max-count=1 --pretty=format:"%B" | tr "\n" " ")\n echo "Got commit message:"\n echo "${git_log}"\n if [[ -v CIRCLE_PULL_REQUEST ]] && \\n ([[ "$git_log" == *"[skip circle]"* ]] || \\n [[ "$git_log" == *"[circle skip]"* ]])\n then\n echo "Skip detected, exiting job ${CIRCLE_JOB} for PR ${CIRCLE_PULL_REQUEST}."\n circleci-agent step halt;\n fi\n - run:\n name: pull changes from merge\n command: |\n if [[ -v CI_PULL_REQUEST ]] ; then git pull --ff-only origin "refs/pull/${CI_PULL_REQUEST//*pull\//}/merge" ; fi\n\n - run:\n name: update submodules\n command: |\n git submodule update --init\n\n - run:\n name: install system dependencies\n command: |\n sudo apt-get update\n sudo apt-get install -y graphviz texlive-fonts-recommended texlive-latex-recommended \\n texlive-latex-extra latexmk texlive-xetex texlive-lang-chinese doxygen\n\n - run:\n name: build NumPy\n command: |\n python3.11 -m venv venv\n . venv/bin/activate\n pip install --progress-bar=off -r requirements/test_requirements.txt \\n -r requirements/build_requirements.txt \\n -r requirements/ci_requirements.txt\n # get newer, pre-release versions of critical packages\n pip install --progress-bar=off --pre -r requirements/doc_requirements.txt\n # then install numpy HEAD, which will override the version installed above\n spin build --with-scipy-openblas=64 -j 2\n\n - run:\n name: build devdocs w/ref warnings\n command: |\n . venv/bin/activate\n # Don't use -q, show warning summary"\n SPHINXOPTS="-W -n" spin docs\n if [[ $(find doc/build/html -type f | wc -l) -lt 1000 ]]; then\n echo "doc build failed: doc/build/html is empty"\n exit -1\n fi\n\n - run:\n name: build neps\n command: |\n . venv/bin/activate\n cd doc/neps\n SPHINXOPTS="-n" make -e html || echo "ignoring errors for now"\n\n - store_artifacts:\n path: doc/build/html/\n\n - store_artifacts:\n path: doc/neps/_build/html/\n # destination: neps\n\n - run:\n name: check doctests\n command: |\n . venv/bin/activate\n spin check-docs -v\n spin check-tutorials -v\n # Currently, this does two checks not done by check-docs:\n # - validates ReST blocks (via validate_rst_syntax)\n # - checks that all of a module's `__all__` is reflected in the\n # module-level docstring autosummary\n echo calling python3 tools/refguide_check.py -v\n python3 tools/refguide_check.py -v\n\n - persist_to_workspace:\n root: ~/repo\n paths:\n - doc/build/html\n - doc/neps/_build\n - tools/ci/push_docs_to_repo.py\n\n deploy:\n <<: *defaults\n steps:\n - checkout\n\n - attach_workspace:\n at: ~/repo\n\n - add_ssh_keys:\n fingerprints:\n - "45:d8:d1:d6:f7:53:47:c5:d0:9e:35:19:79:e7:ff:24"\n\n - run:\n name: deploy devdocs\n command: |\n touch doc/build/html/.nojekyll\n\n ./tools/ci/push_docs_to_repo.py doc/build/html \\n --committer "numpy-circleci-bot" \\n --email "numpy-circleci-bot@nomail" \\n --message "Docs build of $CIRCLE_SHA1" \\n --count 5 \\n --force \\n git@github.com:numpy/devdocs.git\n\n - add_ssh_keys:\n fingerprints:\n - "df:8b:fb:34:2d:38:7d:49:fc:1b:e8:44:4f:bd:2c:0e"\n\n - run:\n name: select SSH key for neps repo\n command: |\n cat \<<\EOF > ~/.ssh/config\n Host github.com\n IdentitiesOnly yes\n IdentityFile /home/circleci/.ssh/id_rsa_df8bfb342d387d49fc1be8444fbd2c0e\n EOF\n\n - run:\n name: deploy neps\n command: |\n touch doc/neps/_build/html/.nojekyll\n\n ./tools/ci/push_docs_to_repo.py doc/neps/_build/html \\n --committer "numpy-circleci-bot" \\n --email "numpy-circleci-bot@nomail" \\n --message "Docs build of $CIRCLE_SHA1" \\n --count 5 \\n --force \\n git@github.com:numpy/neps.git \\n\nworkflows:\n version: 2\n default:\n jobs:\n - build\n - deploy:\n requires:\n - build\n filters:\n branches:\n only: main\n | dataset_sample\yaml\numpy_numpy\.circleci\config.yml | config.yml | YAML | 5,311 | 0.95 | 0.040936 | 0.101351 | react-lib | 711 | 2024-04-27T09:33:34.737276 | GPL-3.0 | false | 97a7071a54f3caa09dc7308a77cd5566 |
version: 2\nupdates:\n - package-ecosystem: github-actions\n directory: /\n schedule:\n interval: daily\n commit-message:\n prefix: "MAINT"\n labels:\n - "03 - Maintenance"\n ignore:\n - dependency-name: "bus1/cabuild"\n | dataset_sample\yaml\numpy_numpy\.github\dependabot.yml | dependabot.yml | YAML | 244 | 0.7 | 0 | 0 | node-utils | 411 | 2025-06-26T06:12:13.325666 | GPL-3.0 | false | cdda441ac7c4cb81ecfae2c10f1b23a3 |
"API": "30 - API"\n"BENCH": "28 - Benchmark"\n"BLD": "36 - Build"\n"BUG": "00 - Bug"\n"DEP": "07 - Deprecation"\n"DEV": "16 - Development"\n"DOC": "04 - Documentation"\n"ENH": "01 - Enhancement"\n"MAINT": "03 - Maintenance"\n"MNT": "03 - Maintenance"\n"REL": "14 - Release"\n"REV": "34 - Reversion"\n"STY": "03 - Maintenance"\n"TST": "05 - Testing"\n"TYP": "41 - Static typing"\n"WIP": "25 - WIP"\n | dataset_sample\yaml\numpy_numpy\.github\pr-prefix-labeler.yml | pr-prefix-labeler.yml | YAML | 382 | 0.7 | 0 | 0 | node-utils | 945 | 2024-02-18T12:39:03.864659 | BSD-3-Clause | false | 17f586fa2bfa1514b83947cad48295a8 |
name: Bug report\ndescription: Report a bug. For security vulnerabilities see Report a security vulnerability in the templates.\ntitle: "BUG: <Please write a comprehensive title after the 'BUG: ' prefix>"\nlabels: [00 - Bug]\n\nbody:\n- type: markdown\n attributes:\n value: >\n Thank you for taking the time to file a bug report. Before creating a new\n issue, please make sure to take a few minutes to check the issue tracker\n for existing issues about the bug.\n \n- type: textarea\n attributes: \n label: "Describe the issue:"\n validations:\n required: true\n\n- type: textarea\n attributes:\n label: "Reproduce the code example:"\n description: >\n A short code example that reproduces the problem/missing feature. It\n should be self-contained, i.e., can be copy-pasted into the Python\n interpreter or run as-is via `python myproblem.py`.\n placeholder: |\n import numpy as np\n << your code here >>\n render: python\n validations:\n required: true\n \n- type: textarea\n attributes:\n label: "Error message:"\n description: >\n Please include full error message, if any.\n If you are reporting a segfault please include a GDB traceback,\n which you can generate by following\n [these instructions](https://github.com/numpy/numpy/blob/main/doc/source/dev/development_environment.rst#debugging).\n placeholder: |\n << Full traceback starting from `Traceback: ...` >>\n render: shell\n\n- type: textarea\n attributes:\n label: "Python and NumPy Versions:"\n description: >\n Output from `import sys, numpy; print(numpy.__version__); print(sys.version)`.\n validations:\n required: true\n\n- type: textarea\n attributes:\n label: "Runtime Environment:"\n description: |\n 1. Install `threadpoolctl` (e.g. with `pip` or `conda`)\n 2. Paste the output of `import numpy; numpy.show_runtime()`.\n\n Note: Only valid for NumPy 1.24 or newer.\n validations:\n required: false\n\n- type: textarea\n attributes:\n label: "Context for the issue:"\n description: |\n Please explain how this issue affects your work or why it should be prioritized.\n placeholder: |\n << your explanation here >>\n validations:\n required: false\n | dataset_sample\yaml\numpy_numpy\.github\ISSUE_TEMPLATE\bug-report.yml | bug-report.yml | YAML | 2,229 | 0.95 | 0.068493 | 0 | awesome-app | 366 | 2023-11-04T00:08:35.428128 | GPL-3.0 | false | 04a89a97decd8617936aaef90b44b3c4 |
contact_links:\n - name: Question/Help/Support\n url: https://numpy.org/gethelp/\n about: "If you have a question, please look at the listed resources available on the website."\n - name: Development-related matters\n url: https://numpy.org/community/\n about: "If you would like to discuss development-related matters or need help from the NumPy team, see our community's communication channels."\n | dataset_sample\yaml\numpy_numpy\.github\ISSUE_TEMPLATE\config.yml | config.yml | YAML | 406 | 0.8 | 0 | 0 | node-utils | 921 | 2024-01-07T06:31:28.992427 | Apache-2.0 | false | e7e8a8fe7e6df0be8bd4b11a3ae3292b |
name: Documentation\ndescription: Report an issue related to the NumPy documentation.\ntitle: "DOC: <Please write a comprehensive title after the 'DOC: ' prefix>"\nlabels: [04 - Documentation]\n\nbody:\n- type: textarea\n attributes: \n label: "Issue with current documentation:"\n description: >\n Please make sure to leave a reference to the document/code you're\n referring to. You can also check the development version of the\n documentation and see if this issue has already been addressed at\n https://numpy.org/devdocs.\n\n- type: textarea\n attributes:\n label: "Idea or request for content:"\n description: >\n Please describe as clearly as possible what topics you think are missing\n from the current documentation. Make sure to check\n https://github.com/numpy/numpy-tutorials and see if this issue might be\n more appropriate there. | dataset_sample\yaml\numpy_numpy\.github\ISSUE_TEMPLATE\documentation.yml | documentation.yml | YAML | 878 | 0.8 | 0.136364 | 0 | vue-tools | 640 | 2024-04-12T18:00:33.331745 | BSD-3-Clause | false | fb21f349b23ddc836fe766b5841f54ed |
name: Feature request\ndescription: Check instructions for submitting your idea on the mailing list first.\ntitle: "ENH: <Please write a comprehensive title after the 'ENH: ' prefix>"\n\nbody:\n- type: markdown\n attributes:\n value: >\n If you're looking to request a new feature or change in functionality,\n including adding or changing the meaning of arguments to an existing\n function, please post your idea on the\n [numpy-discussion mailing list](https://mail.python.org/mailman/listinfo/numpy-discussion)\n to explain your reasoning in addition to opening an issue or pull request.\n You can also check out our\n [Contributor Guide](https://github.com/numpy/numpy/blob/main/doc/source/dev/index.rst)\n if you need more information.\n\n- type: textarea\n attributes:\n label: "Proposed new feature or change:"\n validations:\n required: true | dataset_sample\yaml\numpy_numpy\.github\ISSUE_TEMPLATE\feature-request.yml | feature-request.yml | YAML | 880 | 0.95 | 0.142857 | 0 | node-utils | 906 | 2025-05-19T14:31:17.643404 | BSD-3-Clause | false | 8bb0d30d46ce7b5a351203abb4686666 |
name: Post-install/importing issue\ndescription: Report an issue if you have trouble importing or using NumPy after installation.\ntitle: "<Please write a comprehensive title here>"\nlabels: [32 - Installation]\n\nbody:\n- type: textarea\n attributes:\n label: "Steps to reproduce:"\n description: >\n Please describe the installation method (e.g. building from source,\n Anaconda, pip), your OS and NumPy/Python version information.\n validations:\n required: true\n\n- type: textarea\n attributes:\n label: "Error message:"\n description: >\n Please include full error message, if any.\n If you are reporting a segfault please include a GDB traceback,\n which you can generate by following\n [these instructions](https://github.com/numpy/numpy/blob/main/doc/source/dev/development_environment.rst#debugging).\n placeholder: |\n << Full traceback starting from `Traceback: ...` >>\n render: shell\n\n- type: textarea\n attributes:\n label: "Additional information:"\n description: Please add any additional information that could help us diagnose the problem better. | dataset_sample\yaml\numpy_numpy\.github\ISSUE_TEMPLATE\post-install.yml | post-install.yml | YAML | 1,103 | 0.95 | 0.066667 | 0 | react-lib | 195 | 2024-07-26T01:28:03.088654 | Apache-2.0 | false | 5b76bf905c8098973eae9c3e50e51d5c |
name: Static Typing\ndescription: Report an issue with the NumPy typing hints.\ntitle: "TYP: <Please write a comprehensive title after the 'TYP: ' prefix>"\nlabels: [41 - Static typing]\n\nbody:\n- type: markdown\n attributes:\n value: >\n Thank you for taking the time to report this issue.\n Please make sure that this issue hasn't already been reported before.\n\n- type: textarea\n attributes:\n label: "Describe the issue:"\n validations:\n required: true\n\n- type: textarea\n attributes:\n label: "Reproduce the code example:"\n description: >\n A short code example that reproduces the error in your type-checker. It\n should be self-contained, i.e., can be run as-is via e.g.\n `mypy myproblem.py` or `pyright myproblem.py`.\n placeholder: |\n import numpy as np\n import numpy.typing as npt\n << your code here >>\n render: python\n validations:\n required: true\n\n- type: textarea\n attributes:\n label: "Error message:"\n description: >\n Please include all relevant error messages from your type-checker or IDE.\n render: shell\n\n- type: textarea\n attributes:\n label: "Python and NumPy Versions:"\n description: >\n Output from `import sys, numpy; print(numpy.__version__); print(sys.version)`.\n validations:\n required: true\n\n- type: textarea\n attributes:\n label: "Type-checker version and settings:"\n description: >\n Please include the exact version of the type-checker you are using.\n Popular (static) type checkers include Mypy, Pyright / Pylance, Pytype,\n Pyre, PyCharm, etc.\n Also include the full CLI command used to run the type-checker, and\n all of the relevant configuration options.\n validations:\n required: true\n\n- type: textarea\n attributes:\n label: "Additional typing packages."\n description: |\n If you are using `typing-extensions` or typing-stub packages, please\n list their versions here.\n validations:\n required: false\n | dataset_sample\yaml\numpy_numpy\.github\ISSUE_TEMPLATE\typing.yml | typing.yml | YAML | 1,966 | 0.85 | 0.014706 | 0 | react-lib | 60 | 2024-01-31T00:17:59.574727 | BSD-3-Clause | false | dd4c32e0b0c8f88981edd7615fcc7bd7 |
name: MesonBuildTest\ndescription: "checkout repo, build, and test numpy"\nruns:\n using: composite\n steps:\n - name: Build\n shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'\n env:\n TERM: xterm-256color\n PKG_CONFIG_PATH: ./.openblas\n run: |\n echo "::group::Installing Build Dependencies"\n pip install -r requirements/build_requirements.txt\n echo "::endgroup::"\n echo "::group::Building NumPy"\n spin build --clean -- ${MESON_ARGS[@]}\n echo "::endgroup::"\n\n - name: Meson Log\n shell: bash\n if: always()\n run: |\n echo "::group::Meson Log"\n cat build/meson-logs/meson-log.txt\n echo "::endgroup::"\n\n - name: Test\n shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'\n env:\n TERM: xterm-256color\n run: |\n echo "::group::Installing Test Dependencies"\n pip install pytest pytest-xdist pytest-timeout hypothesis typing_extensions\n pip install -r requirements/setuptools_requirement.txt\n echo "::endgroup::"\n echo "::group::Test NumPy"\n spin test -- --durations=10 --timeout=600\n echo "::endgroup::"\n | dataset_sample\yaml\numpy_numpy\.github\meson_actions\action.yml | action.yml | YAML | 1,146 | 0.85 | 0.026316 | 0 | python-kit | 616 | 2024-04-09T11:00:39.400949 | MIT | false | c8c75062fec32b51af1f350befe38486 |
# To enable this workflow on a fork, comment out:\n#\n# if: github.repository == 'numpy/numpy'\n\nname: CircleCI artifact redirector\n\non: [status]\n\npermissions: read-all\n\njobs:\n circleci_artifacts_redirector_job:\n runs-on: ubuntu-latest\n if: "github.repository == 'numpy/numpy' && !contains(github.event.head_commit.message, '[circle skip]') && !contains(github.event.head_commit.message, '[skip circle]') && github.event.context == 'ci/circleci: build'"\n name: Run CircleCI artifacts redirector\n permissions:\n statuses: write\n steps:\n - name: GitHub Action step\n uses: larsoner/circleci-artifacts-redirector-action@4e13a10d89177f4bfc8007a7064bdbeda848d8d1 # master\n with:\n repo-token: ${{ secrets.GITHUB_TOKEN }}\n api-token: ${{ secrets.CIRCLE_TOKEN }}\n artifact-path: 0/doc/build/html/index.html\n circleci-jobs: build\n | dataset_sample\yaml\numpy_numpy\.github\workflows\circleci.yml | circleci.yml | YAML | 893 | 0.8 | 0.08 | 0.142857 | vue-tools | 136 | 2025-01-08T20:32:41.472269 | Apache-2.0 | false | 67b2c0a806473815cb7cbed44d54a389 |
# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# You may wish to alter this file to override the set of languages analyzed,\n# or to provide custom queries or build logic.\n#\n# ******** NOTE ********\n# We have attempted to detect the languages in your repository. Please check\n# the `language` matrix defined below to confirm you have the correct set of\n# supported CodeQL languages.\n#\nname: "CodeQL"\n\non:\n push:\n branches: ["main"]\n pull_request:\n # The branches below must be a subset of the branches above\n branches: ["main"]\n schedule:\n - cron: "0 0 * * 1"\n\npermissions:\n contents: read\n\njobs:\n analyze:\n name: Analyze\n runs-on: ubuntu-latest\n permissions:\n actions: read\n contents: read\n security-events: write\n\n strategy:\n fail-fast: false\n matrix:\n language: ["python"]\n # CodeQL supports [ $supported-codeql-languages ]\n # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support\n\n steps:\n - name: Checkout repository\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n persist-credentials: false\n\n # Initializes the CodeQL tools for scanning.\n - name: Initialize CodeQL\n uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15\n with:\n languages: ${{ matrix.language }}\n # If you wish to specify custom queries, you can do so here or in a config file.\n # By default, queries listed here will override any specified in a config file.\n # Prefix the list here with "+" to use these queries and those in the config file.\n\n # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).\n # If this step fails, then you should remove it and run the build manually (see below)\n - name: Autobuild\n uses: github/codeql-action/autobuild@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15\n\n # βΉοΈ Command-line programs to run using the OS shell.\n # π See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun\n\n # If the Autobuild fails above, remove it and uncomment the following three lines.\n # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.\n\n # - run: |\n # echo "Run, Build Application using script"\n # ./location_of_script_within_repo/buildscript.sh\n\n - name: Perform CodeQL Analysis\n uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15\n with:\n category: "/language:${{matrix.language}}"\n | dataset_sample\yaml\numpy_numpy\.github\workflows\codeql.yml | codeql.yml | YAML | 2,774 | 0.8 | 0.053333 | 0.421875 | vue-tools | 151 | 2024-12-07T12:34:11.316944 | Apache-2.0 | false | 4bcb9538f739cc9c2ffdf2094310dbb5 |
name: Test with compiler sanitizers\n\non:\n push:\n branches:\n - main\n pull_request:\n branches:\n - main\n - maintenance/**\n\ndefaults:\n run:\n shell: bash\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\njobs:\n clang_ASAN:\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n runs-on: macos-latest\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - name: Set up pyenv\n run: |\n git clone https://github.com/pyenv/pyenv.git "$HOME/.pyenv"\n PYENV_ROOT="$HOME/.pyenv"\n PYENV_BIN="$PYENV_ROOT/bin"\n PYENV_SHIMS="$PYENV_ROOT/shims"\n echo "$PYENV_BIN" >> $GITHUB_PATH\n echo "$PYENV_SHIMS" >> $GITHUB_PATH\n echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV\n - name: Check pyenv is working\n run:\n pyenv --version\n - name: Set up LLVM\n run: |\n brew install llvm@19\n LLVM_PREFIX=$(brew --prefix llvm@19)\n echo CC="$LLVM_PREFIX/bin/clang" >> $GITHUB_ENV\n echo CXX="$LLVM_PREFIX/bin/clang++" >> $GITHUB_ENV\n echo LDFLAGS="-L$LLVM_PREFIX/lib" >> $GITHUB_ENV\n echo CPPFLAGS="-I$LLVM_PREFIX/include" >> $GITHUB_ENV\n - name: Build Python with address sanitizer\n run: |\n CONFIGURE_OPTS="--with-address-sanitizer" pyenv install 3.13t\n pyenv global 3.13t\n - name: Install dependencies\n run: |\n # TODO: remove when a released cython supports free-threaded python\n pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython\n pip install -r requirements/build_requirements.txt\n pip install -r requirements/ci_requirements.txt\n pip install -r requirements/test_requirements.txt\n # xdist captures stdout/stderr, but we want the ASAN output\n pip uninstall -y pytest-xdist\n - name: Build\n run:\n python -m spin build -j2 -- -Db_sanitize=address\n - name: Test\n run: |\n # pass -s to pytest to see ASAN errors and warnings, otherwise pytest captures them\n ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1 \\n python -m spin test -- -v -s --timeout=600 --durations=10\n\n clang_TSAN:\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n runs-on: macos-latest\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - name: Set up pyenv\n run: |\n git clone https://github.com/pyenv/pyenv.git "$HOME/.pyenv"\n PYENV_ROOT="$HOME/.pyenv"\n PYENV_BIN="$PYENV_ROOT/bin"\n PYENV_SHIMS="$PYENV_ROOT/shims"\n echo "$PYENV_BIN" >> $GITHUB_PATH\n echo "$PYENV_SHIMS" >> $GITHUB_PATH\n echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV\n - name: Check pyenv is working\n run:\n pyenv --version\n - name: Set up LLVM\n run: |\n brew install llvm@19\n LLVM_PREFIX=$(brew --prefix llvm@19)\n echo CC="$LLVM_PREFIX/bin/clang" >> $GITHUB_ENV\n echo CXX="$LLVM_PREFIX/bin/clang++" >> $GITHUB_ENV\n echo LDFLAGS="-L$LLVM_PREFIX/lib" >> $GITHUB_ENV\n echo CPPFLAGS="-I$LLVM_PREFIX/include" >> $GITHUB_ENV\n - name: Build Python with thread sanitizer support\n run: |\n # free-threaded Python is much more likely to trigger races\n CONFIGURE_OPTS="--with-thread-sanitizer" pyenv install 3.13t\n pyenv global 3.13t\n - name: Install dependencies\n run: |\n # TODO: remove when a released cython supports free-threaded python\n pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython\n pip install -r requirements/build_requirements.txt\n pip install -r requirements/ci_requirements.txt\n pip install -r requirements/test_requirements.txt\n # xdist captures stdout/stderr, but we want the TSAN output\n pip uninstall -y pytest-xdist\n - name: Build\n run:\n python -m spin build -j2 -- -Db_sanitize=thread\n - name: Test\n run: |\n # These tests are slow, so only run tests in files that do "import threading" to make them count\n TSAN_OPTIONS="allocator_may_return_null=1:suppressions=$GITHUB_WORKSPACE/tools/ci/tsan_suppressions.txt" \\n python -m spin test \\n `find numpy -name "test*.py" | xargs grep -l "import threading" | tr '\n' ' '` \\n -- -v -s --timeout=600 --durations=10\n | dataset_sample\yaml\numpy_numpy\.github\workflows\compiler_sanitizers.yml | compiler_sanitizers.yml | YAML | 4,820 | 0.95 | 0.015504 | 0.073171 | node-utils | 5 | 2024-01-05T11:00:10.635497 | GPL-3.0 | false | 8b62869981dfd5cb558d5659a6c82ed6 |
name: Test on Cygwin\non:\n pull_request:\n branches:\n - main\n - maintenance/**\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\njobs:\n cygwin_build_test:\n runs-on: windows-latest\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - name: Install Cygwin\n uses: egor-tensin/setup-cygwin@d2c752bab416d4b0662591bd366fc2686297c82d # v4\n with:\n platform: x86_64\n install-dir: 'C:\tools\cygwin'\n packages: >-\n python39=3.9.16-1 python39-devel=3.9.16-1 python39-pip python-pip-wheel\n python-setuptools-wheel liblapack-devel liblapack0 gcc-fortran\n gcc-g++ git dash cmake ninja\n - name: Set Windows PATH\n uses: egor-tensin/cleanup-path@f04bc953e6823bf491cc0bdcff959c630db1b458 # v4.0.1\n with:\n dirs: 'C:\tools\cygwin\bin;C:\tools\cygwin\lib\lapack'\n - name: Verify that bash is Cygwin bash\n run: |\n command bash\n bash -c "uname -svrmo"\n - name: Tell Cygwin's git about this repository.\n run: |\n dash -c "which git; /usr/bin/git config --system --add safe.directory /cygdrive/d/a/numpy/numpy"\n - name: Verify python version\n # Make sure it's the Cygwin one, not a Windows one\n run: |\n dash -c "which python3.9; /usr/bin/python3.9 --version -V"\n - name: Build NumPy wheel\n run: |\n dash -c "/usr/bin/python3.9 -m pip install build pytest hypothesis pytest-xdist Cython meson"\n dash -c "/usr/bin/python3.9 -m build . --wheel -Csetup-args=-Dblas=blas -Csetup-args=-Dlapack=lapack -Csetup-args=-Dcpu-dispatch=none -Csetup-args=-Dcpu-baseline=native"\n - name: Install NumPy from wheel\n run: |\n bash -c "/usr/bin/python3.9 -m pip install dist/numpy-*cp39*.whl"\n - name: Rebase NumPy compiled extensions\n run: |\n dash "tools/rebase_installed_dlls_cygwin.sh" 3.9\n - name: Run NumPy test suite\n shell: "C:\\tools\\cygwin\\bin\\bash.exe -o igncr -eo pipefail {0}"\n run: |\n cd tools\n /usr/bin/python3.9 -m pytest --pyargs numpy -n2 -m "not slow"\n - name: Upload wheel if tests fail\n uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n if: failure()\n with:\n name: numpy-cygwin-wheel\n path: dist/numpy-*cp39*.whl\n - name: Check the extension modules on failure\n if: failure()\n run: |\n dash -c "/usr/bin/python3.9 -m pip show numpy"\n dash -c "/usr/bin/python3.9 -m pip show -f numpy | grep .dll"\n dash -c "/bin/tr -d '\r' <tools/list_installed_dll_dependencies_cygwin.sh >list_dlls_unix.sh"\n dash "list_dlls_unix.sh" 3.9\n - name: Print installed package versions on failure\n if: failure()\n run: |\n cygcheck -c\n | dataset_sample\yaml\numpy_numpy\.github\workflows\cygwin.yml | cygwin.yml | YAML | 3,232 | 0.8 | 0.061728 | 0.025641 | react-lib | 789 | 2025-04-22T07:24:45.677360 | Apache-2.0 | false | 5cfeda9a4949b05d1c7c29b4b4ff3ab9 |
# Dependency Review Action\n#\n# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.\n#\n# Source repository: https://github.com/actions/dependency-review-action\n# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement\nname: 'Dependency Review'\non: [pull_request]\n\npermissions:\n contents: read\n\njobs:\n dependency-review:\n runs-on: ubuntu-latest\n steps:\n - name: 'Checkout Repository'\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n persist-credentials: false\n - name: 'Dependency Review'\n uses: actions/dependency-review-action@ce3cf9537a52e8119d91fd484ab5b8a807627bf8 # v4.6.0\n with:\n allow-ghsas: GHSA-cx63-2mw6-8hw5\n | dataset_sample\yaml\numpy_numpy\.github\workflows\dependency-review.yml | dependency-review.yml | YAML | 1,087 | 0.95 | 0.041667 | 0.272727 | vue-tools | 873 | 2024-01-15T04:55:46.486611 | GPL-3.0 | false | 8b1254b818fbbb463f3a22013a7b30b9 |
name: Test Emscripten/Pyodide build\n\non:\n pull_request:\n branches:\n - main\n - maintenance/**\n # Note: this workflow gets triggered on the same schedule as the\n # wheels.yml workflow to upload WASM wheels to Anaconda.org.\n schedule:\n # ββββββββββββββ minute (0 - 59)\n # β ββββββββββββββ hour (0 - 23)\n # β β ββββββββββββββ day of the month (1 - 31)\n # β β β ββββββββββββββ month (1 - 12 or JAN-DEC)\n # β β β β ββββββββββββββ day of the week (0 - 6 or SUN-SAT)\n # β β β β β\n - cron: "42 2 * * SUN,WED"\n workflow_dispatch:\n inputs:\n push_wheels:\n # Can be 'true' or 'false'. Default is 'false'.\n # Warning: this will overwrite existing wheels.\n description: >\n Push wheels to Anaconda.org if the build succeeds\n required: false\n default: 'false'\n\nenv:\n FORCE_COLOR: 3\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\n\njobs:\n build-wasm-emscripten:\n permissions:\n contents: read # to fetch code (actions/checkout)\n name: Build NumPy distribution for Pyodide\n runs-on: ubuntu-22.04\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n steps:\n - name: Checkout NumPy\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - uses: pypa/cibuildwheel@d04cacbc9866d432033b1d09142936e6a0e2121a # 2.23.2\n env:\n CIBW_PLATFORM: pyodide\n\n - name: Upload wheel artifact(s)\n uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: cp312-pyodide_wasm32\n path: ./wheelhouse/*.whl\n if-no-files-found: error\n\n # Push to https://anaconda.org/scientific-python-nightly-wheels/numpy\n # WARNING: this job will overwrite any existing WASM wheels.\n upload-wheels:\n name: Upload NumPy WASM wheels to Anaconda.org\n runs-on: ubuntu-22.04\n permissions: {}\n needs: [build-wasm-emscripten]\n if: >-\n (github.repository == 'numpy/numpy') &&\n (github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') ||\n (github.event_name == 'schedule')\n steps:\n - name: Download wheel artifact(s)\n uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1\n with:\n path: wheelhouse/\n merge-multiple: true\n\n - name: Push to Anaconda PyPI index\n uses: scientific-python/upload-nightly-action@b36e8c0c10dbcfd2e05bf95f17ef8c14fd708dbf # v0.6.2\n with:\n artifacts_path: wheelhouse/\n anaconda_nightly_upload_token: ${{ secrets.NUMPY_NIGHTLY_UPLOAD_TOKEN }}\n | dataset_sample\yaml\numpy_numpy\.github\workflows\emscripten.yml | emscripten.yml | YAML | 3,054 | 0.95 | 0.058824 | 0.171053 | react-lib | 831 | 2024-01-18T21:43:29.473302 | GPL-3.0 | false | 5cc06ff84cfee6c4bfdb7aff6e35a76a |
name: "Pull Request Labeler"\non:\n pull_request_target:\n types: [opened]\n\npermissions: {}\n\njobs:\n pr-labeler:\n runs-on: ubuntu-latest\n permissions:\n pull-requests: write # to add labels\n steps:\n - name: Label the PR\n uses: gerrymanoim/pr-prefix-labeler@c8062327f6de59a9ae1c19f7f07cacd0b976b6fa # v3\n continue-on-error: true\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n if: github.repository == 'numpy/numpy'\n | dataset_sample\yaml\numpy_numpy\.github\workflows\labeler.yml | labeler.yml | YAML | 462 | 0.8 | 0.052632 | 0 | awesome-app | 828 | 2024-06-24T23:55:32.001920 | BSD-3-Clause | false | 3e9578c3a4c6482867374c785b1856d0 |
name: Linux tests\n\n# This file is meant for testing across supported Python versions, build types\n# and interpreters (PyPy, python-dbg, a pre-release Python in summer time),\n# build-via-sdist, run benchmarks, measure code coverage, and other build\n# options.\n\non:\n push:\n branches:\n # coverage comparison in the "full" step needs to run on main after merges\n - main\n pull_request:\n branches:\n - main\n - maintenance/**\n\ndefaults:\n run:\n shell: bash\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\njobs:\n lint:\n # To enable this job and subsequent jobs on a fork, comment out:\n if: github.repository == 'numpy/numpy' && github.event_name != 'push'\n runs-on: ubuntu-latest\n continue-on-error: true\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-depth: 0\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n - name: Install linter requirements\n run:\n python -m pip install -r requirements/linter_requirements.txt\n - name: Run linter on PR\n env:\n BASE_REF: ${{ github.base_ref }}\n run:\n python tools/linter.py\n\n smoke_test:\n # To enable this job on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n env:\n MESON_ARGS: "-Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none"\n strategy:\n matrix:\n version: ["3.11", "3.12", "3.13", "3.14-dev", "3.14t-dev"]\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: ${{ matrix.version }}\n # TODO: remove cython nightly install when cython does a release\n - name: Install nightly Cython\n if: matrix.version == '3.14t-dev'\n run: |\n pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython\n - uses: ./.github/meson_actions\n\n pypy:\n needs: [smoke_test]\n runs-on: ubuntu-latest\n if: github.event_name != 'push'\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: 'pypy3.11-v7.3.19'\n - name: Setup using scipy-openblas\n run: |\n python -m pip install -r requirements/ci_requirements.txt\n spin config-openblas --with-scipy-openblas=32\n - uses: ./.github/meson_actions\n\n debug:\n needs: [smoke_test]\n runs-on: ubuntu-24.04\n if: github.event_name != 'push'\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - name: Install debug Python\n run: |\n sudo apt-get update\n sudo apt-get install python3-dbg ninja-build\n - name: Build NumPy and install into venv\n run: |\n python3-dbg -m venv venv\n source venv/bin/activate\n pip install -U pip\n pip install . -v -Csetup-args=-Dbuildtype=debug -Csetup-args=-Dallow-noblas=true\n - name: Install test dependencies\n run: |\n source venv/bin/activate\n pip install -r requirements/test_requirements.txt\n - name: Run test suite\n run: |\n source venv/bin/activate\n cd tools\n pytest --timeout=600 --durations=10 --pyargs numpy -m "not slow"\n\n full:\n # Install as editable, then run the full test suite with code coverage\n needs: [smoke_test]\n runs-on: ubuntu-22.04\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n - name: Install build and test dependencies from PyPI\n run: |\n pip install -r requirements/build_requirements.txt\n pip install -r requirements/test_requirements.txt\n - name: Install gfortran and setup OpenBLAS (MacPython build)\n run: |\n set -xe\n sudo apt update\n sudo apt install gfortran libgfortran5\n python -m pip install -r requirements/ci32_requirements.txt\n mkdir -p ./.openblas\n python -c"import scipy_openblas32 as ob32; print(ob32.get_pkg_config())" > ./.openblas/scipy-openblas.pc\n\n - name: Install as editable\n env:\n PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas\n run: |\n pip install -e . --no-build-isolation\n - name: Run full test suite\n run: |\n pytest numpy --durations=10 --timeout=600 --cov-report=html:build/coverage\n # TODO: gcov\n env:\n PYTHONOPTIMIZE: 2\n \n\n aarch64_test:\n needs: [smoke_test]\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-22.04-arm\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install Python dependencies\n run: |\n python -m pip install -r requirements/build_requirements.txt\n python -m pip install -r requirements/test_requirements.txt\n python -m pip install -r requirements/ci32_requirements.txt\n mkdir -p ./.openblas\n python -c"import scipy_openblas32 as ob32; print(ob32.get_pkg_config())" > ./.openblas/scipy-openblas.pc\n\n - name: Build\n env:\n PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas\n run: |\n spin build\n\n - name: Test\n run: |\n spin test -j2 -m full -- --timeout=600 --durations=10\n\n\n armhf_test:\n # Tests NumPy on 32-bit ARM hard-float (armhf) via compatibility mode\n # running on aarch64 (ARM 64-bit) GitHub runners.\n needs: [smoke_test]\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-22.04-arm\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n \n - name: Creates new container\n run: |\n docker run --name the_container --interactive \\n -v $(pwd):/numpy arm32v7/ubuntu:22.04 /bin/linux32 /bin/bash -c "\n apt update &&\n apt install -y ninja-build cmake git python3 python-is-python3 python3-dev python3-pip python3-venv &&\n python -m pip install -r /numpy/requirements/build_requirements.txt &&\n python -m pip install -r /numpy/requirements/test_requirements.txt\n "\n docker commit the_container the_container\n\n - name: Meson Build\n run: |\n docker run --rm -e "TERM=xterm-256color" \\n -v $(pwd):/numpy the_container \\n /bin/script -e -q -c "/bin/linux32 /bin/bash --noprofile --norc -eo pipefail -c '\n cd /numpy && spin build \n '"\n\n - name: Meson Log\n if: always()\n run: 'cat build/meson-logs/meson-log.txt'\n\n - name: Run Tests\n run: |\n docker run --rm -e "TERM=xterm-256color" \\n -v $(pwd):/numpy the_container \\n /bin/script -e -q -c "/bin/linux32 /bin/bash --noprofile --norc -eo pipefail -c '\n cd /numpy && spin test -m full -- --timeout=600 --durations=10\n '"\n\n benchmark:\n needs: [smoke_test]\n runs-on: ubuntu-latest\n if: github.event_name != 'push'\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n - name: Install build and benchmarking dependencies\n run: |\n sudo apt-get update\n sudo apt-get install libopenblas-dev ninja-build\n pip install asv virtualenv packaging -r requirements/build_requirements.txt\n - name: Install NumPy\n run: |\n spin build -- -Dcpu-dispatch=none\n # Ensure to keep the below steps as single-line bash commands (it's a\n # workaround for asv#1333, and it may have side-effects on multi-line commands)\n - name: Appease asv's need for machine info\n shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'\n run: |\n asv machine --yes --config benchmarks/asv.conf.json\n - name: Run benchmarks\n shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'\n run: |\n spin bench --quick\n # These are run on CircleCI\n # - name: Check docstests\n # shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'\n # run: |\n # pip install scipy-doctest==1.6.0 hypothesis==6.104.1 matplotlib scipy pytz pandas\n # spin check-docs -v\n # spin check-tutorials -v\n\n sdist:\n needs: [smoke_test]\n runs-on: ubuntu-latest\n if: github.event_name != 'push'\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n - name: Install gfortran and setup OpenBLAS (sdist build)\n run: |\n set -xe\n python -m pip install -r requirements/ci_requirements.txt\n mkdir -p ./.openblas\n python -c"import scipy_openblas64 as ob64; print(ob64.get_pkg_config())" > ./.openblas/scipy-openblas.pc\n - name: Build a wheel via an sdist\n env:\n PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas\n run: |\n pip install build\n python -m build\n pip install dist/numpy*.whl\n - name: Install test dependencies\n run: |\n pip install -r requirements/test_requirements.txt\n - name: Run test suite\n run: |\n cd tools\n pytest --pyargs numpy -m "not slow"\n\n array_api_tests:\n needs: [smoke_test]\n runs-on: ubuntu-latest\n if: github.event_name != 'push'\n steps:\n - name: Checkout NumPy\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - name: Checkout array-api-tests\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n repository: data-apis/array-api-tests\n ref: '827edd804bcace9d64176b8115138d29ae3e8dec' # Latest commit as of 2024-07-30\n submodules: 'true'\n path: 'array-api-tests'\n persist-credentials: false\n - name: Set up Python\n uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n - name: Install build and test dependencies from PyPI\n run: |\n python -m pip install -r requirements/build_requirements.txt\n python -m pip install -r requirements/test_requirements.txt\n python -m pip install -r array-api-tests/requirements.txt\n - name: Build and install NumPy\n run: |\n python -m pip install . -v -Csetup-args=-Dallow-noblas=true -Csetup-args=-Dcpu-baseline=none -Csetup-args=-Dcpu-dispatch=none\n - name: Run the test suite\n env:\n ARRAY_API_TESTS_MODULE: numpy\n PYTHONWARNINGS: 'ignore::UserWarning::,ignore::DeprecationWarning::,ignore::RuntimeWarning::'\n run: |\n cd ${GITHUB_WORKSPACE}/array-api-tests\n pytest array_api_tests -v -c pytest.ini --ci --max-examples=100 --derandomize --disable-deadline --xfails-file ${GITHUB_WORKSPACE}/tools/ci/array-api-xfails.txt\n\n custom_checks:\n needs: [smoke_test]\n runs-on: ubuntu-latest\n if: github.event_name != 'push'\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n - name: Install build and test dependencies from PyPI\n run: |\n pip install -r requirements/build_requirements.txt\n pip install -r requirements/test_requirements.txt\n pip install vulture\n - name: Build and install NumPy\n run: |\n # Install using the fastest way to build (no BLAS, no SIMD)\n spin build -j2 -- -Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none\n - name: Check build-internal dependencies\n run: |\n ninja -C build -t missingdeps\n - name: Check installed test and stub files\n run: |\n python tools/check_installed_files.py $(find ./build-install -path '*/site-packages/numpy')\n - name: Check for unreachable code paths in Python modules\n run: |\n # Need the explicit `bash -c` here because `grep` returns exit code 1 for no matches\n bash -c "! vulture . --min-confidence 100 --exclude doc/,numpy/distutils/,vendored-meson/ | grep 'unreachable'"\n - name: Check usage of install_tag\n run: |\n rm -rf build-install\n ./vendored-meson/meson/meson.py install -C build --destdir ../build-install --tags=runtime,python-runtime,devel\n python tools/check_installed_files.py $(find ./build-install -path '*/site-packages/numpy') --no-tests\n | dataset_sample\yaml\numpy_numpy\.github\workflows\linux.yml | linux.yml | YAML | 14,107 | 0.95 | 0.043367 | 0.063014 | python-kit | 229 | 2024-11-22T19:02:53.616999 | Apache-2.0 | false | 464663471eb4878bec584800237bedbc |
name: BLAS tests (Linux)\n\n# This file is meant for testing different BLAS/LAPACK flavors and build\n# options on Linux. All other yml files for Linux will only test without BLAS\n# (mostly because that's easier and faster to build) or with the same 64-bit\n# OpenBLAS build that is used in the wheel jobs.\n#\n# Jobs and their purpose:\n#\n# - openblas32_stable_nightly:\n# Uses the 32-bit OpenBLAS builds, both the latest stable release\n# and a nightly build.\n# - openblas_no_pkgconfig_fedora:\n# Test OpenBLAS on Fedora. Fedora doesn't ship .pc files for OpenBLAS,\n# hence this exercises the "system dependency" detection method.\n# - flexiblas_fedora:\n# Tests FlexiBLAS (the default on Fedora for its own packages), via\n# pkg-config. FlexiBLAS allows runtime switching of BLAS/LAPACK\n# libraries, which is a useful capability (not tested in this job).\n# - openblas_cmake:\n# Tests whether OpenBLAS LP64 is detected correctly when only CMake\n# and not pkg-config is installed.\n# - netlib-debian:\n# Installs libblas/liblapack, which in Debian contains libcblas within\n# libblas.\n# - netlib-split:\n# Installs vanilla Netlib blas/lapack with separate libcblas, which is\n# the last option tried in auto-detection.\n# - mkl:\n# Tests MKL installed from PyPI (because easiest/fastest, if broken) in\n# 3 ways: both LP64 and ILP64 via pkg-config, and then using the\n# Single Dynamic Library (SDL, or `libmkl_rt`).\n# - blis:\n# Simple test for LP64 via pkg-config\n# - atlas:\n# Simple test for LP64 via pkg-config\n\non:\n pull_request:\n branches:\n - main\n - maintenance/**\n\ndefaults:\n run:\n shell: bash\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\njobs:\n openblas32_stable_nightly:\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n strategy:\n fail-fast: false\n matrix:\n USE_NIGHTLY_OPENBLAS: [false, true]\n env:\n USE_NIGHTLY_OPENBLAS: ${{ matrix.USE_NIGHTLY_OPENBLAS }}\n name: "Test Linux (${{ matrix.USE_NIGHTLY_OPENBLAS && 'nightly' || 'stable' }} OpenBLAS)"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n # Install OpenBLAS\n if [[ $USE_NIGHTLY_OPENBLAS == "true" ]]; then\n python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy-openblas32\n else\n python -m pip install -r requirements/ci32_requirements.txt\n fi\n mkdir -p ./.openblas\n python -c"import scipy_openblas32 as ob32; print(ob32.get_pkg_config())" > ./.openblas/scipy-openblas.pc\n echo "PKG_CONFIG_PATH=${{ github.workspace }}/.openblas" >> $GITHUB_ENV\n ld_library_path=$(python -c"import scipy_openblas32 as ob32; print(ob32.get_lib_dir())")\n echo "LD_LIBRARY_PATH=$ld_library_path" >> $GITHUB_ENV\n\n - name: Build\n shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'\n env:\n TERM: xterm-256color\n run:\n spin build -- --werror -Dallow-noblas=false\n\n - name: Check build-internal dependencies\n run:\n ninja -C build -t missingdeps\n\n - name: Check installed test and stub files\n run:\n python tools/check_installed_files.py $(find ./build-install -path '*/site-packages/numpy')\n - name: Ensure scipy-openblas\n run: |\n set -ex\n spin python tools/check_openblas_version.py 0.3.26\n\n - name: Test\n shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'\n env:\n TERM: xterm-256color\n run: |\n pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout\n spin test -j auto -- --timeout=600 --durations=10\n\n\n openblas_no_pkgconfig_fedora:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n container: fedora:39\n name: "OpenBLAS (Fedora, no pkg-config, LP64/ILP64)"\n steps:\n - name: Install system dependencies\n run: |\n dnf install git gcc-gfortran g++ python3-devel openblas-devel -y\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n pip install pytest hypothesis typing_extensions pytest-timeout\n\n - name: Build (LP64)\n run: spin build -- -Dblas=openblas -Dlapack=openblas -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: spin test -- numpy/linalg --timeout=600 --durations=10\n\n - name: Build (ILP64)\n run: |\n rm -rf build\n spin build -- -Duse-ilp64=true -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: spin test -- numpy/linalg --timeout=600 --durations=10\n\n\n flexiblas_fedora:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n container: fedora:39\n name: "FlexiBLAS (LP64, ILP64 on Fedora)"\n steps:\n - name: Install system dependencies\n run: |\n dnf install git gcc-gfortran g++ python3-devel flexiblas-devel -y\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n pip install pytest hypothesis typing_extensions pytest-timeout\n\n - name: Build\n run: spin build -- -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: spin test -- numpy/linalg --timeout=600 --durations=10\n\n - name: Build (ILP64)\n run: |\n rm -rf build\n spin build -- -Ddisable-optimization=true -Duse-ilp64=true -Dallow-noblas=false\n\n - name: Test (ILP64)\n run: spin test -- numpy/linalg --timeout=600 --durations=10\n\n\n openblas_cmake:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n name: "OpenBLAS with CMake"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout\n sudo apt-get update\n sudo apt-get install libopenblas-dev cmake\n sudo apt-get remove pkg-config\n\n - name: Build\n run: spin build -- -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: spin test -j auto -- numpy/linalg --timeout=600 --durations=10\n\n \n netlib-debian:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n name: "Debian libblas/liblapack"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n sudo apt-get update\n sudo apt-get install liblapack-dev pkg-config\n\n - name: Build\n run: |\n spin build -- -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: |\n pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout\n spin test -j auto -- numpy/linalg --timeout=600 --durations=10\n\n\n netlib-split:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n container: opensuse/tumbleweed\n name: "OpenSUSE Netlib BLAS/LAPACK"\n steps:\n - name: Install system dependencies\n run: |\n # No blas.pc on OpenSUSE as of Nov 2023, so no need to install pkg-config.\n # If it is needed in the future, use install name `pkgconf-pkg-config`\n zypper install -y git gcc-c++ python3-pip python3-devel blas cblas lapack\n\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - name: Install PyPI dependencies\n run: |\n pip install --break-system-packages -r requirements/build_requirements.txt\n\n - name: Build\n run: |\n spin build -- -Dblas=blas -Dlapack=lapack -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: |\n pip install --break-system-packages pytest pytest-xdist hypothesis typing_extensions pytest-timeout\n spin test -j auto -- numpy/linalg --timeout=600 --durations=10\n\n\n mkl:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n name: "MKL (LP64, ILP64, SDL)"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout\n pip install mkl mkl-devel\n\n - name: Repair MKL pkg-config files and symlinks\n run: |\n # MKL 2023.2 works when installed from conda-forge (except for `-iomp`\n # and `-tbb` pkg-config files), Spack, or with the standalone Intel\n # installer. The standalone installer is the worst option, since it's\n # large and clumsy to install and requires running a setvars.sh script\n # before things work. The PyPI MKL packages are broken and need the\n # fixes in this step. For details, see\n # https://github.com/conda-forge/intel_repack-feedstock/issues/34\n cd $Python3_ROOT_DIR/lib/pkgconfig\n sed -i 's/\/intel64//g' mkl*.pc\n # add the expected .so -> .so.2 symlinks to fix linking\n cd ..\n for i in $( ls libmkl*.so.2 ); do ln -s $i ${i%.*}; done\n\n - name: Build with defaults (LP64)\n run: |\n pkg-config --libs mkl-dynamic-lp64-seq # check link flags\n spin build -- -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: spin test -- numpy/linalg --timeout=600 --durations=10\n\n - name: Build with ILP64\n run: |\n git clean -xdf > /dev/null\n pkg-config --libs mkl-dynamic-ilp64-seq\n spin build -- -Duse-ilp64=true -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: spin test -- numpy/linalg --timeout=600 --durations=10\n\n - name: Build without pkg-config (default options, SDL)\n run: |\n git clean -xdf > /dev/null\n pushd $Python3_ROOT_DIR/lib/pkgconfig\n rm mkl*.pc\n popd\n export MKLROOT=$Python3_ROOT_DIR\n spin build -- -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: spin test -- numpy/linalg --timeout=600 --durations=10\n\n blis:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n name: "BLIS"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout\n sudo apt-get update\n sudo apt-get install libblis-dev libopenblas-dev pkg-config\n\n - name: Add BLIS pkg-config file\n run: |\n # Needed because blis.pc missing in Debian:\n # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989076\n # The alternative here would be to use another distro or Miniforge\n sudo cp tools/ci/_blis_debian.pc /usr/lib/x86_64-linux-gnu/pkgconfig/blis.pc\n # Check if the patch works:\n pkg-config --libs blis\n pkg-config --cflags blis\n\n - name: Build\n run: spin build -- -Dblas=blis -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: spin test -- numpy/linalg --timeout=600 --durations=10\n\n atlas:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n name: "ATLAS"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout\n sudo apt-get update\n sudo apt-get install libatlas-base-dev pkg-config\n\n - name: Build\n run: spin build -- -Dblas=blas-atlas -Dlapack=lapack-atlas -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test\n run: spin test -- numpy/linalg\n\n | dataset_sample\yaml\numpy_numpy\.github\workflows\linux_blas.yml | linux_blas.yml | YAML | 14,136 | 0.95 | 0.04878 | 0.144092 | react-lib | 343 | 2025-01-08T01:24:35.386296 | GPL-3.0 | false | 774cdc87bcd597d84c12614bbe51d248 |
name: Test musllinux_x86_64\n\non:\n pull_request:\n branches:\n - main\n - maintenance/**\n\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\n\njobs:\n musllinux_x86_64:\n runs-on: ubuntu-latest\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n container:\n # Use container used for building musllinux wheels\n # it has git installed, all the pythons, etc\n image: quay.io/pypa/musllinux_1_2_x86_64\n\n steps:\n - name: setup\n run: |\n apk update --quiet\n\n # using git commands to clone because versioneer doesn't work when\n # actions/checkout is used for the clone step in a container\n\n git config --global --add safe.directory $PWD \n\n if [ $GITHUB_EVENT_NAME != pull_request ]; then\n git clone --recursive --branch=$GITHUB_REF_NAME https://github.com/${GITHUB_REPOSITORY}.git $GITHUB_WORKSPACE\n git reset --hard $GITHUB_SHA\n else\n git clone --recursive https://github.com/${GITHUB_REPOSITORY}.git $GITHUB_WORKSPACE\n git fetch origin $GITHUB_REF:my_ref_name\n git checkout $GITHUB_BASE_REF\n git -c user.email="you@example.com" merge --no-commit my_ref_name\n fi\n git submodule update --init\n\n ln -s /usr/local/bin/python3.11 /usr/local/bin/python\n\n - name: test-musllinux_x86_64\n env:\n PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas\n run: |\n python -m venv test_env\n source test_env/bin/activate\n\n pip install -r requirements/ci_requirements.txt\n pip install -r requirements/build_requirements.txt -r requirements/test_requirements.txt\n\n # use meson to build and test \n spin build --with-scipy-openblas=64\n spin test -j auto -- --timeout=600 --durations=10\n\n - name: Meson Log\n shell: bash\n run: |\n cat build/meson-logs/meson-log.txt\n | dataset_sample\yaml\numpy_numpy\.github\workflows\linux_musl.yml | linux_musl.yml | YAML | 2,065 | 0.95 | 0.057971 | 0.113208 | react-lib | 129 | 2025-05-04T02:04:09.132893 | MIT | false | 6dadce1ceae9246022449c7f7d772ef2 |
name: Linux SIMD tests\n\n# This file is meant for testing different SIMD-related build options and\n# optimization levels. See `meson_options.txt` for the available build options.\n#\n# Jobs and their purposes:\n#\n# - baseline_only:\n# Focuses on completing as quickly as possible and acts as a filter for other, more resource-intensive jobs.\n# Utilizes only the default baseline targets (e.g., SSE3 on X86_64) without enabling any runtime dispatched features.\n#\n# - old_gcc:\n# Tests the oldest supported GCC version with default CPU/baseline/dispatch settings.\n#\n# - without_optimizations:\n# Completely disables all SIMD optimizations and other compiler optimizations such as loop unrolling.\n#\n# - native:\n# Tests against the host CPU features set as the baseline without enabling any runtime dispatched features.\n# Intended to assess the entire NumPy codebase against host flags, even for code sections lacking handwritten SIMD intrinsics.\n#\n# - without_avx512/avx2/fma3:\n# Uses runtime SIMD dispatching but disables AVX2, FMA3, and AVX512.\n# Intended to evaluate 128-bit SIMD extensions without FMA support.\n#\n# - without_avx512:\n# Uses runtime SIMD dispatching but disables AVX512.\n# Intended to evaluate 128-bit/256-bit SIMD extensions.\n#\n# - intel_sde:\n# Executes only the SIMD tests for various AVX512 SIMD extensions under the Intel Software Development Emulator (SDE).\n#\non:\n pull_request:\n branches:\n - main\n - maintenance/**\n\ndefaults:\n run:\n shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'\n\nenv:\n TERM: xterm-256color\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\njobs:\n baseline_only:\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n runs-on: ubuntu-latest\n env:\n MESON_ARGS: "-Dallow-noblas=true -Dcpu-dispatch=none"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n - uses: ./.github/meson_actions\n name: Build/Test\n\n old_gcc:\n if: github.event_name != 'push'\n needs: [baseline_only]\n runs-on: ubuntu-latest\n env:\n MESON_ARGS: "-Dallow-noblas=true"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install GCC9/10\n run: |\n echo "deb http://archive.ubuntu.com/ubuntu focal main universe" | sudo tee /etc/apt/sources.list.d/focal.list\n sudo apt update\n sudo apt install -y g++-9 g++-10\n\n - name: Enable gcc-9\n run: |\n sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 1\n sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 1\n\n - uses: ./.github/meson_actions\n name: Build/Test against gcc-9\n\n - name: Enable gcc-10\n run: |\n sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 2\n sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 2\n\n - uses: ./.github/meson_actions\n name: Build/Test against gcc-10\n\n arm64_simd:\n if: github.repository == 'numpy/numpy'\n needs: [baseline_only]\n runs-on: ubuntu-22.04-arm\n strategy:\n fail-fast: false\n matrix:\n config:\n - name: "baseline only"\n args: "-Dallow-noblas=true -Dcpu-dispatch=none"\n - name: "with ASIMD"\n args: "-Dallow-noblas=true -Dcpu-baseline=asimd"\n - name: "native"\n args: "-Dallow-noblas=true -Dcpu-baseline=native -Dcpu-dispatch=none"\n name: "ARM64 SIMD - ${{ matrix.config.name }}"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n - name: Install dependencies\n run: |\n python -m pip install -r requirements/build_requirements.txt\n python -m pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout\n - name: Build\n run: |\n spin build -- ${{ matrix.config.args }}\n - name: Test\n run: |\n spin test -- --timeout=600 --durations=10\n\n specialize:\n needs: [baseline_only]\n runs-on: ubuntu-latest\n if: github.event_name != 'push'\n continue-on-error: true\n strategy:\n fail-fast: false\n matrix:\n BUILD_PROP:\n - [\n "without optimizations",\n "-Dallow-noblas=true -Ddisable-optimization=true",\n "3.12"\n ]\n - [\n "native",\n "-Dallow-noblas=true -Dcpu-baseline=native -Dcpu-dispatch=none",\n "3.11"\n ]\n - [\n "without avx512",\n "-Dallow-noblas=true -Dcpu-dispatch=SSSE3,SSE41,POPCNT,SSE42,AVX,F16C,AVX2,FMA3",\n "3.11"\n ]\n - [\n "without avx512/avx2/fma3",\n "-Dallow-noblas=true -Dcpu-dispatch=SSSE3,SSE41,POPCNT,SSE42,AVX,F16C",\n "3.11"\n ]\n\n env:\n MESON_ARGS: ${{ matrix.BUILD_PROP[1] }}\n\n name: "${{ matrix.BUILD_PROP[0] }}"\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: "${{ matrix.BUILD_PROP[2] }}"\n - uses: ./.github/meson_actions\n name: Build/Test\n\n intel_sde_avx512:\n needs: [baseline_only]\n runs-on: ubuntu-24.04\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install Intel SDE\n run: |\n curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/788820/sde-external-9.27.0-2023-09-13-lin.tar.xz\n mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/\n sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde\n\n - name: Install dependencies\n run: |\n python -m pip install -r requirements/build_requirements.txt\n python -m pip install pytest pytest-xdist hypothesis typing_extensions\n\n - name: Build\n run: CC=gcc-13 CXX=g++-13 spin build -- -Dallow-noblas=true -Dcpu-baseline=avx512_skx -Dtest-simd='BASELINE,AVX512_KNL,AVX512_KNM,AVX512_SKX,AVX512_CLX,AVX512_CNL,AVX512_ICL,AVX512_SPR'\n\n - name: Meson Log\n if: always()\n run: cat build/meson-logs/meson-log.txt\n\n - name: SIMD tests (SKX)\n run: |\n export NUMPY_SITE=$(realpath build-install/usr/lib/python*/site-packages/)\n export PYTHONPATH="$PYTHONPATH:$NUMPY_SITE"\n cd build-install &&\n sde -skx -- python -c "import numpy; numpy.show_config()" &&\n sde -skx -- python -m pytest $NUMPY_SITE/numpy/_core/tests/test_simd*\n\n - name: linalg/ufunc/umath tests (TGL)\n run: |\n export NUMPY_SITE=$(realpath build-install/usr/lib/python*/site-packages/)\n export PYTHONPATH="$PYTHONPATH:$NUMPY_SITE"\n cd build-install &&\n sde -tgl -- python -c "import numpy; numpy.show_config()" &&\n sde -tgl -- python -m pytest $NUMPY_SITE/numpy/_core/tests/test_umath* \\n $NUMPY_SITE/numpy/_core/tests/test_ufunc.py \\n $NUMPY_SITE/numpy/_core/tests/test_multiarray.py \\n $NUMPY_SITE/numpy/linalg/tests/test_*\n\n\n intel_sde_spr:\n needs: [baseline_only]\n runs-on: ubuntu-24.04\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n\n - name: Install Intel SDE\n run: |\n curl -o /tmp/sde.tar.xz https://downloadmirror.intel.com/788820/sde-external-9.27.0-2023-09-13-lin.tar.xz\n mkdir /tmp/sde && tar -xvf /tmp/sde.tar.xz -C /tmp/sde/\n sudo mv /tmp/sde/* /opt/sde && sudo ln -s /opt/sde/sde64 /usr/bin/sde\n\n - name: Install dependencies\n run: |\n python -m pip install -r requirements/build_requirements.txt\n python -m pip install pytest pytest-xdist hypothesis typing_extensions\n\n - name: Build\n run: CC=gcc-13 CXX=g++-13 spin build -- -Dallow-noblas=true -Dcpu-baseline=avx512_spr\n\n - name: Meson Log\n if: always()\n run: cat build/meson-logs/meson-log.txt\n\n - name: SIMD tests (SPR)\n run: |\n export NUMPY_SITE=$(realpath build-install/usr/lib/python*/site-packages/)\n export PYTHONPATH="$PYTHONPATH:$NUMPY_SITE"\n cd build-install &&\n sde -spr -- python -c "import numpy; numpy.show_config()" &&\n sde -spr -- python -m pytest $NUMPY_SITE/numpy/_core/tests/test_simd*\n\n - name: linalg/ufunc/umath tests on Intel SPR\n run: |\n export NUMPY_SITE=$(realpath build-install/usr/lib/python*/site-packages/)\n export PYTHONPATH="$PYTHONPATH:$NUMPY_SITE"\n cd build-install &&\n sde -spr -- python -c "import numpy; numpy.show_config()" &&\n sde -spr -- python -m pytest $NUMPY_SITE/numpy/_core/tests/test_umath* \\n $NUMPY_SITE/numpy/_core/tests/test_ufunc.py \\n $NUMPY_SITE/numpy/_core/tests/test_multiarray.py \\n $NUMPY_SITE/numpy/linalg/tests/test_*\n | dataset_sample\yaml\numpy_numpy\.github\workflows\linux_simd.yml | linux_simd.yml | YAML | 10,312 | 0.95 | 0.038062 | 0.120155 | vue-tools | 689 | 2023-11-12T01:37:00.325307 | GPL-3.0 | false | 89589504ce7fd378c14eb877d357a2d1 |
name: macOS tests\n\non:\n pull_request:\n branches:\n - main\n - maintenance/**\n\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\nenv:\n CCACHE_DIR: "${{ github.workspace }}/.ccache"\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\njobs:\n x86_conda:\n name: macOS x86-64 conda\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n runs-on: macos-13\n strategy:\n fail-fast: false\n matrix:\n python-version: ["3.12"]\n\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - name: Prepare cache dirs and timestamps\n id: prep-ccache\n shell: bash -l {0}\n run: |\n mkdir -p "${CCACHE_DIR}"\n echo "dir=$CCACHE_DIR" >> $GITHUB_OUTPUT\n NOW=$(date -u +"%F-%T")\n echo "timestamp=${NOW}" >> $GITHUB_OUTPUT\n echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT\n\n - name: Setup compiler cache\n uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3\n id: cache-ccache\n with:\n path: ${{ steps.prep-ccache.outputs.dir }}\n key: ${{ github.workflow }}-${{ matrix.python-version }}-ccache-macos-${{ steps.prep-ccache.outputs.timestamp }}\n restore-keys: |\n ${{ github.workflow }}-${{ matrix.python-version }}-ccache-macos-\n\n - name: Setup Miniforge\n uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1\n with:\n python-version: ${{ matrix.python-version }}\n channels: conda-forge\n channel-priority: true\n activate-environment: numpy-dev\n use-only-tar-bz2: false\n miniforge-variant: Miniforge3\n miniforge-version: latest\n use-mamba: true\n\n # Updates if `environment.yml` or the date changes. The latter is needed to\n # ensure we re-solve once a day (since we don't lock versions). Could be\n # replaced by a conda-lock based approach in the future.\n - name: Cache conda environment\n uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3\n env:\n # Increase this value to reset cache if environment.yml has not changed\n CACHE_NUMBER: 1\n with:\n path: ${{ env.CONDA }}/envs/numpy-dev\n key:\n ${{ runner.os }}--${{ steps.prep-ccache.outputs.today }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}\n id: envcache\n\n - name: Update Conda Environment\n run: mamba env update -n numpy-dev -f environment.yml\n if: steps.envcache.outputs.cache-hit != 'true'\n\n - name: Build and Install NumPy\n shell: bash -l {0}\n run: |\n conda activate numpy-dev\n CC="ccache $CC" spin build -j2 -- -Dallow-noblas=false\n\n - name: Run test suite (full)\n shell: bash -l {0}\n run: |\n conda activate numpy-dev\n export OMP_NUM_THREADS=2\n spin test -j2 -m full\n\n - name: Ccache statistics\n shell: bash -l {0}\n run: |\n conda activate numpy-dev\n ccache -s\n\n\n accelerate:\n name: Accelerate - ${{ matrix.build_runner[1] }} - ${{ matrix.version }}\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n runs-on: ${{ matrix.build_runner[0] }}\n strategy:\n fail-fast: false\n matrix:\n build_runner:\n - [ macos-13, "macos_x86_64" ]\n - [ macos-14, "macos_arm64" ]\n version: ["3.11", "3.13t"]\n\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86\n with:\n python-version: ${{ matrix.version }}\n enable-cache: false\n\n - run:\n uv pip install --python=${{ matrix.version }} pip\n\n - uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0\n if: ${{ matrix.build_runner[0] == 'macos-13' }}\n with:\n xcode-version: '14.3'\n\n # TODO: remove cython nightly install when cython does a release\n - name: Install nightly Cython\n if: matrix.version == '3.13t'\n run: |\n pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython\n\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n pip install -r requirements/setuptools_requirement.txt\n pip install pytest pytest-xdist pytest-timeout hypothesis\n\n - name: Build against Accelerate (LP64)\n run: spin build -- -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test (linalg only)\n run: spin test -j2 -- numpy/linalg --timeout=600 --durations=10\n\n - name: Build NumPy against Accelerate (ILP64)\n run: |\n rm -r build build-install\n spin build -- -Duse-ilp64=true -Ddisable-optimization=true -Dallow-noblas=false\n\n - name: Test (fast tests)\n run: spin test -j2 -- --timeout=600 --durations=10\n | dataset_sample\yaml\numpy_numpy\.github\workflows\macos.yml | macos.yml | YAML | 5,238 | 0.95 | 0.042683 | 0.051095 | node-utils | 869 | 2025-04-18T11:09:20.492189 | MIT | false | d0547b0daf49047f7d5d7601328ef32b |
name: Run MyPy\n\n# Mypy is too slow to run as part of regular CI. The purpose of the jobs in\n# this file is to cover running Mypy across:\n#\n# - OSes: Linux, Windows and macOS\n# - Python versions: lowest/highest supported versions, and an intermediate one\n#\n# The build matrix aims for sparse coverage across those two dimensions.\n# Use of BLAS/LAPACK and SIMD is disabled on purpose, because those things\n# don't matter for static typing and this speeds up the builds.\n#\n# This is a separate job file so it's easy to trigger by hand.\n\non:\n pull_request:\n branches:\n - main\n - maintenance/**\n paths-ignore:\n - 'benchmarks/'\n - '.circlecl/'\n - 'docs/'\n - 'meson_cpu/'\n - 'tools/'\n workflow_dispatch:\n\ndefaults:\n run:\n shell: bash\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\njobs:\n mypy:\n # To enable this workflow on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n name: "MyPy"\n runs-on: ${{ matrix.os_python[0] }}\n strategy:\n fail-fast: false\n matrix:\n os_python:\n - [ubuntu-latest, '3.12']\n - [windows-latest, '3.11']\n - [macos-latest, '3.11']\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: ${{ matrix.os_python[1] }}\n - name: Install dependencies\n run: |\n pip install -r requirements/build_requirements.txt\n # orjson makes mypy faster but the default requirements.txt\n # can't install it because orjson doesn't support 32 bit Linux\n pip install orjson\n pip install -r requirements/test_requirements.txt\n - name: Build\n run: |\n spin build -j2 -- -Dallow-noblas=true -Ddisable-optimization=true --vsenv\n - name: Run Mypy\n run: |\n spin mypy\n | dataset_sample\yaml\numpy_numpy\.github\workflows\mypy.yml | mypy.yml | YAML | 2,137 | 0.95 | 0.040541 | 0.208955 | vue-tools | 278 | 2025-06-24T18:08:40.301894 | Apache-2.0 | false | 7db5012ba95fa56cdd73841550d34cac |
name: Run mypy_primer\n\non:\n # Only run on PR, since we diff against main\n pull_request:\n paths:\n - "**/*.pyi"\n - ".github/workflows/mypy_primer.yml"\n - ".github/workflows/mypy_primer_comment.yml"\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read\n\njobs:\n mypy_primer:\n name: Run\n runs-on: ubuntu-latest\n strategy:\n matrix:\n shard-index: [0] # e.g. change this to [0, 1, 2] and --num-shards below to 3\n fail-fast: false\n steps:\n - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n path: numpy_to_test\n fetch-depth: 0\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: "3.12"\n - name: Install dependencies\n run: pip install git+https://github.com/hauntsaninja/mypy_primer.git\n - name: Run mypy_primer\n shell: bash\n run: |\n cd numpy_to_test\n MYPY_VERSION=$(grep mypy== requirements/test_requirements.txt | sed -n 's/mypy==\([^;]*\).*/\1/p')\n\n echo "new commit"\n git checkout $GITHUB_SHA\n git rev-list --format=%s --max-count=1 HEAD\n\n MERGE_BASE=$(git merge-base $GITHUB_SHA origin/$GITHUB_BASE_REF)\n git worktree add ../numpy_base $MERGE_BASE\n cd ../numpy_base\n\n echo "base commit"\n git rev-list --format=%s --max-count=1 HEAD\n\n echo ''\n cd ..\n # fail action if exit code isn't zero or one\n # TODO: note that we don't build numpy, so if a project attempts to use the\n # numpy mypy plugin, we may see some issues involving version skew.\n (\n mypy_primer \\n --new v${MYPY_VERSION} --old v${MYPY_VERSION} \\n --known-dependency-selector numpy \\n --old-prepend-path numpy_base --new-prepend-path numpy_to_test \\n --num-shards 1 --shard-index ${{ matrix.shard-index }} \\n --debug \\n --output concise \\n | tee diff_${{ matrix.shard-index }}.txt\n ) || [ $? -eq 1 ]\n - if: ${{ matrix.shard-index == 0 }}\n name: Save PR number\n run: |\n echo ${{ github.event.pull_request.number }} | tee pr_number.txt\n - name: Upload mypy_primer diff + PR number\n uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n if: ${{ matrix.shard-index == 0 }}\n with:\n name: mypy_primer_diffs-${{ matrix.shard-index }}\n path: |\n diff_${{ matrix.shard-index }}.txt\n pr_number.txt\n - name: Upload mypy_primer diff\n uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n if: ${{ matrix.shard-index != 0 }}\n with:\n name: mypy_primer_diffs-${{ matrix.shard-index }}\n path: diff_${{ matrix.shard-index }}.txt\n\n join_artifacts:\n name: Join artifacts\n runs-on: ubuntu-latest\n needs: [mypy_primer]\n permissions:\n contents: read\n steps:\n - name: Merge artifacts\n uses: actions/upload-artifact/merge@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: mypy_primer_diffs\n pattern: mypy_primer_diffs-*\n delete-merged: true\n | dataset_sample\yaml\numpy_numpy\.github\workflows\mypy_primer.yml | mypy_primer.yml | YAML | 3,392 | 0.95 | 0.050505 | 0.044444 | vue-tools | 312 | 2024-06-05T20:05:38.391098 | Apache-2.0 | false | b82b3f2125424a9270a8175dc5ce82cd |
name: Comment with mypy_primer diff\n\non:\n workflow_run:\n workflows:\n - Run mypy_primer\n types:\n - completed\n\npermissions:\n contents: read\n pull-requests: write\n\njobs:\n comment:\n name: Comment PR from mypy_primer\n runs-on: ubuntu-latest\n if: ${{ github.event.workflow_run.conclusion == 'success' }}\n steps:\n - name: Download diffs\n uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1\n with:\n script: |\n const fs = require('fs');\n const artifacts = await github.rest.actions.listWorkflowRunArtifacts({\n owner: context.repo.owner,\n repo: context.repo.repo,\n run_id: ${{ github.event.workflow_run.id }},\n });\n const [matchArtifact] = artifacts.data.artifacts.filter((artifact) =>\n artifact.name == "mypy_primer_diffs");\n\n const download = await github.rest.actions.downloadArtifact({\n owner: context.repo.owner,\n repo: context.repo.repo,\n artifact_id: matchArtifact.id,\n archive_format: "zip",\n });\n fs.writeFileSync("diff.zip", Buffer.from(download.data));\n\n - run: unzip diff.zip\n\n - name: Get PR number\n id: get-pr-number\n uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1\n with:\n script: |\n const fs = require('fs');\n return parseInt(fs.readFileSync("pr_number.txt", { encoding: "utf8" }))\n\n - name: Hide old comments\n uses: kanga333/comment-hider@c12bb20b48aeb8fc098e35967de8d4f8018fffdf # v0.4.0\n with:\n github_token: ${{ secrets.GITHUB_TOKEN }}\n issue_number: ${{ steps.get-pr-number.outputs.result }}\n\n - run: cat diff_*.txt | tee fulldiff.txt\n\n - name: Post comment\n id: post-comment\n uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1\n with:\n github-token: ${{ secrets.GITHUB_TOKEN }}\n script: |\n const MAX_CHARACTERS = 50000\n const MAX_CHARACTERS_PER_PROJECT = MAX_CHARACTERS / 3\n\n const fs = require('fs')\n let data = fs.readFileSync('fulldiff.txt', { encoding: 'utf8' })\n\n function truncateIfNeeded(original, maxLength) {\n if (original.length <= maxLength) {\n return original\n }\n let truncated = original.substring(0, maxLength)\n // further, remove last line that might be truncated\n truncated = truncated.substring(0, truncated.lastIndexOf('\n'))\n let lines_truncated = original.split('\n').length - truncated.split('\n').length\n return `${truncated}\n\n... (truncated ${lines_truncated} lines) ...`\n }\n\n const projects = data.split('\n\n')\n // don't let one project dominate\n data = projects.map(project => truncateIfNeeded(project, MAX_CHARACTERS_PER_PROJECT)).join('\n\n')\n // posting comment fails if too long, so truncate\n data = truncateIfNeeded(data, MAX_CHARACTERS)\n\n console.log("Diff from mypy_primer:")\n console.log(data)\n\n let body\n if (data.trim()) {\n body = 'Diff from [mypy_primer](https://github.com/hauntsaninja/mypy_primer), '\n body += 'showing the effect of this PR on type check results on a corpus of open source code:\n```diff\n'\n body += data + '```'\n const prNumber = parseInt(fs.readFileSync("pr_number.txt", { encoding: "utf8" }))\n await github.rest.issues.createComment({\n issue_number: prNumber,\n owner: context.repo.owner,\n repo: context.repo.repo,\n body\n })\n }\n | dataset_sample\yaml\numpy_numpy\.github\workflows\mypy_primer_comment.yml | mypy_primer_comment.yml | YAML | 3,902 | 0.95 | 0.048544 | 0.033708 | python-kit | 252 | 2023-10-27T20:40:28.503584 | MIT | false | 029d8fec938e65e42b21ab9769864269 |
name: Scorecards supply-chain security\non:\n # For Branch-Protection check. Only the default branch is supported. See\n # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection\n branch_protection_rule:\n # To guarantee Maintained check is occasionally updated. See\n # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained\n schedule:\n - cron: "19 23 * * 5"\n push:\n branches: ["main"]\n\n# Declare default permissions as read only.\npermissions: {}\n\njobs:\n analysis:\n name: Scorecards analysis\n runs-on: ubuntu-latest\n permissions:\n # Needed to upload the results to code-scanning dashboard.\n security-events: write\n # Needed to publish results and get a badge (see publish_results below).\n id-token: write\n\n steps:\n - name: "Checkout code"\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3.1.0\n with:\n persist-credentials: false\n\n - name: "Run analysis"\n uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1\n with:\n results_file: results.sarif\n results_format: sarif\n # Publish results to OpenSSF REST API for easy access by consumers.\n # Allows the repository to include the Scorecard badge.\n # See https://github.com/ossf/scorecard-action#publishing-results.\n publish_results: true\n\n # Upload the results as artifacts (optional). Commenting out will disable\n # uploads of run results in SARIF format to the repository Actions tab.\n - name: "Upload artifact"\n uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: SARIF file\n path: results.sarif\n retention-days: 5\n\n # Upload the results to GitHub's code scanning dashboard.\n - name: "Upload to code-scanning"\n uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v2.1.27\n with:\n sarif_file: results.sarif\n | dataset_sample\yaml\numpy_numpy\.github\workflows\scorecards.yml | scorecards.yml | YAML | 2,039 | 0.8 | 0.018182 | 0.265306 | react-lib | 986 | 2023-12-23T01:57:26.040353 | BSD-3-Clause | false | 39ac1868e5b37bdeeb8d757e440ce451 |
# Workflow to build and test wheels.\n# To work on the wheel building infrastructure on a fork, comment out:\n#\n# if: github.repository == 'numpy/numpy'\n#\n# in the get_commit_message job. Be sure to include [wheel build] in your commit\n# message to trigger the build. All files related to wheel building are located\n# at tools/wheels/\n# Alternatively, you can add labels to the pull request in order to trigger wheel\n# builds.\n# The labels that trigger builds are:\n# 36 - Build(for changes to the building process,\n# 14 - Release(ensure wheels build before release)\nname: Wheel builder\n\non:\n schedule:\n # ββββββββββββββ minute (0 - 59)\n # β ββββββββββββββ hour (0 - 23)\n # β β ββββββββββββββ day of the month (1 - 31)\n # β β β ββββββββββββββ month (1 - 12 or JAN-DEC)\n # β β β β ββββββββββββββ day of the week (0 - 6 or SUN-SAT)\n # β β β β β\n - cron: "42 2 * * SUN,WED"\n pull_request:\n branches:\n - main\n - maintenance/**\n push:\n tags:\n - v*\n workflow_dispatch:\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\njobs:\n get_commit_message:\n name: Get commit message\n runs-on: ubuntu-latest\n # Only workflow_dispatch is enabled on forks.\n # To enable this job and subsequent jobs on a fork for other events, comment out:\n if: github.repository == 'numpy/numpy' || github.event_name == 'workflow_dispatch'\n outputs:\n message: ${{ steps.commit_message.outputs.message }}\n steps:\n - name: Checkout numpy\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n # Gets the correct commit message for pull request\n with:\n ref: ${{ github.event.pull_request.head.sha }}\n persist-credentials: false\n - name: Get commit message\n id: commit_message\n env:\n HEAD: ${{ github.ref }}\n run: |\n set -xe\n COMMIT_MSG=$(git log --no-merges -1 --oneline)\n echo "message=$COMMIT_MSG" >> $GITHUB_OUTPUT\n echo github.ref "$HEAD"\n\n build_wheels:\n name: Build wheel ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}\n needs: get_commit_message\n if: >-\n contains(needs.get_commit_message.outputs.message, '[wheel build]') ||\n github.event_name == 'schedule' ||\n github.event_name == 'workflow_dispatch' ||\n (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))\n runs-on: ${{ matrix.buildplat[0] }}\n strategy:\n # Ensure that a wheel builder finishes even if another fails\n fail-fast: false\n matrix:\n # Github Actions doesn't support pairing matrix values together, let's improvise\n # https://github.com/github/feedback/discussions/7835#discussioncomment-1769026\n buildplat:\n - [ubuntu-22.04, manylinux_x86_64, ""]\n - [ubuntu-22.04, musllinux_x86_64, ""]\n - [ubuntu-22.04-arm, manylinux_aarch64, ""]\n - [ubuntu-22.04-arm, musllinux_aarch64, ""]\n - [macos-13, macosx_x86_64, openblas]\n\n # targeting macos >= 14. Could probably build on macos-14, but it would be a cross-compile\n - [macos-13, macosx_x86_64, accelerate]\n - [macos-14, macosx_arm64, accelerate] # always use accelerate\n - [windows-2019, win_amd64, ""]\n - [windows-2019, win32, ""]\n python: ["cp311", "cp312", "cp313", "cp313t", "pp311"]\n exclude:\n # Don't build PyPy 32-bit windows\n - buildplat: [windows-2019, win32, ""]\n python: "pp311"\n # No PyPy on musllinux images\n - buildplat: [ ubuntu-22.04, musllinux_x86_64, "" ]\n python: "pp311"\n - buildplat: [ ubuntu-22.04-arm, musllinux_aarch64, "" ]\n python: "pp311"\n - buildplat: [ macos13, macosx_x86_64, openblas ]\n python: "cp313t"\n\n env:\n IS_32_BIT: ${{ matrix.buildplat[1] == 'win32' }}\n IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}\n IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}\n steps:\n - name: Checkout numpy\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: true\n persist-credentials: false\n\n - name: Setup MSVC (32-bit)\n if: ${{ matrix.buildplat[1] == 'win32' }}\n uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1\n with:\n architecture: 'x86'\n\n - name: pkg-config-for-win\n run: |\n choco install -y --no-progress --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite\n $CIBW = "${{ github.workspace }}/.openblas"\n # pkgconfig needs a complete path, and not just "./openblas since the\n # build is run in a tmp dir (?)\n # It seems somewhere in the env passing, `\` is not\n # passed through, so convert it to '/'\n $CIBW = $CIBW.replace("\","/")\n echo "CIBW_ENVIRONMENT_WINDOWS=PKG_CONFIG_PATH=$CIBW" >> $env:GITHUB_ENV\n if: runner.os == 'windows'\n\n # Used to push the built wheels\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: "3.x"\n\n - name: Setup macOS\n if: matrix.buildplat[0] == 'macos-13' || matrix.buildplat[0] == 'macos-14'\n run: |\n # Needed due to https://github.com/actions/runner-images/issues/3371\n # Supported versions: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md\n echo "FC=gfortran-13" >> "$GITHUB_ENV"\n echo "F77=gfortran-13" >> "$GITHUB_ENV"\n echo "F90=gfortran-13" >> "$GITHUB_ENV"\n if [[ ${{ matrix.buildplat[2] }} == 'accelerate' ]]; then\n # macosx_arm64 and macosx_x86_64 with accelerate\n # only target Sonoma onwards\n CIBW="MACOSX_DEPLOYMENT_TARGET=14.0 INSTALL_OPENBLAS=false RUNNER_OS=macOS"\n echo "CIBW_ENVIRONMENT_MACOS=$CIBW" >> "$GITHUB_ENV"\n\n # the macos-13 image that's used for building the x86_64 wheel can't test\n # a wheel with deployment target >= 14 without further work\n echo "CIBW_TEST_SKIP=*-macosx_x86_64" >> "$GITHUB_ENV"\n else\n # macosx_x86_64 with OpenBLAS\n # if INSTALL_OPENBLAS isn't specified then scipy-openblas is automatically installed\n CIBW="RUNNER_OS=macOS"\n PKG_CONFIG_PATH="$PWD/.openblas"\n DYLD="$DYLD_LIBRARY_PATH:/$PWD/.openblas/lib"\n echo "CIBW_ENVIRONMENT_MACOS=$CIBW PKG_CONFIG_PATH=$PKG_CONFIG_PATH DYLD_LIBRARY_PATH=$DYLD" >> "$GITHUB_ENV"\n fi\n\n - name: Set up free-threaded build\n if: matrix.python == 'cp313t'\n shell: bash -el {0}\n run: |\n echo "CIBW_BUILD_FRONTEND=pip; args: --no-build-isolation" >> "$GITHUB_ENV"\n\n - name: Build wheels\n uses: pypa/cibuildwheel@d04cacbc9866d432033b1d09142936e6a0e2121a # v2.23.2\n env:\n CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}\n\n - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}\n path: ./wheelhouse/*.whl\n\n - uses: mamba-org/setup-micromamba@0dea6379afdaffa5d528b3d1dabc45da37f443fc\n with:\n # for installation of anaconda-client, required for upload to\n # anaconda.org\n # Note that this step is *after* specific pythons have been used to\n # build and test the wheel\n # for installation of anaconda-client, for upload to anaconda.org\n # environment will be activated after creation, and in future bash steps\n init-shell: bash\n environment-name: upload-env\n create-args: >-\n anaconda-client\n\n - name: Upload wheels\n if: success() && github.repository == 'numpy/numpy'\n shell: bash -el {0}\n # see https://github.com/marketplace/actions/setup-miniconda for why\n # `-el {0}` is required.\n env:\n NUMPY_STAGING_UPLOAD_TOKEN: ${{ secrets.NUMPY_STAGING_UPLOAD_TOKEN }}\n NUMPY_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.NUMPY_NIGHTLY_UPLOAD_TOKEN }}\n run: |\n source tools/wheels/upload_wheels.sh\n set_upload_vars\n # trigger an upload to\n # https://anaconda.org/scientific-python-nightly-wheels/numpy\n # for cron jobs or "Run workflow" (restricted to main branch).\n # Tags will upload to\n # https://anaconda.org/multibuild-wheels-staging/numpy\n # The tokens were originally generated at anaconda.org\n upload_wheels\n\n build_sdist:\n name: Build sdist\n needs: get_commit_message\n if: >-\n contains(needs.get_commit_message.outputs.message, '[wheel build]') ||\n github.event_name == 'schedule' ||\n github.event_name == 'workflow_dispatch' ||\n (github.event_name == 'pull_request' &&\n (contains(github.event.pull_request.labels.*.name, '36 - Build') ||\n contains(github.event.pull_request.labels.*.name, '14 - Release'))) ||\n (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))\n runs-on: ubuntu-latest\n env:\n IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}\n # commented out so the sdist doesn't upload to nightly\n # IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}\n steps:\n - name: Checkout numpy\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: true\n persist-credentials: false\n # Used to push the built wheels\n - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n # Build sdist on lowest supported Python\n python-version: "3.11"\n - name: Build sdist\n run: |\n python -m pip install -U pip build\n python -m build --sdist -Csetup-args=-Dallow-noblas=true\n - name: Test the sdist\n run: |\n # TODO: Don't run test suite, and instead build wheels from sdist\n # Depends on pypa/cibuildwheel#1020\n python -m pip install dist/*.gz -Csetup-args=-Dallow-noblas=true\n pip install -r requirements/test_requirements.txt\n cd .. # Can't import numpy within numpy src directory\n python -c "import numpy, sys; print(numpy.__version__); sys.exit(numpy.test() is False)"\n\n - name: Check README rendering for PyPI\n run: |\n python -mpip install twine\n twine check dist/*\n\n - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: sdist\n path: ./dist/*\n\n - uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3.1.1\n with:\n # for installation of anaconda-client, required for upload to\n # anaconda.org\n # default (and activated) environment name is test\n # Note that this step is *after* specific pythons have been used to\n # build and test\n auto-update-conda: true\n python-version: "3.11"\n\n - name: Upload sdist\n if: success() && github.repository == 'numpy/numpy'\n shell: bash -el {0}\n env:\n NUMPY_STAGING_UPLOAD_TOKEN: ${{ secrets.NUMPY_STAGING_UPLOAD_TOKEN }}\n # commented out so the sdist doesn't upload to nightly\n # NUMPY_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.NUMPY_NIGHTLY_UPLOAD_TOKEN }}\n run: |\n conda install -y anaconda-client\n source tools/wheels/upload_wheels.sh\n set_upload_vars\n # trigger an upload to\n # https://anaconda.org/scientific-python-nightly-wheels/numpy\n # for cron jobs or "Run workflow" (restricted to main branch).\n # Tags will upload to\n # https://anaconda.org/multibuild-wheels-staging/numpy\n # The tokens were originally generated at anaconda.org\n upload_wheels\n | dataset_sample\yaml\numpy_numpy\.github\workflows\wheels.yml | wheels.yml | YAML | 12,683 | 0.95 | 0.09589 | 0.274074 | node-utils | 494 | 2024-12-01T13:13:17.483924 | MIT | false | cfc8b72b4646e12bade95e2e35c45179 |
name: Windows tests\n\non:\n pull_request:\n branches:\n - main\n - maintenance/**\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\njobs:\n python64bit_openblas:\n name: x86-64, LP64 OpenBLAS\n runs-on: windows-2019\n # To enable this job on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n strategy:\n fail-fast: false\n matrix:\n compiler-pyversion:\n - ["MSVC", "3.11"]\n - ["Clang-cl", "3.13t"]\n\n steps:\n - name: Checkout\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - name: Setup Python\n uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86\n with:\n python-version: ${{ matrix.compiler-pyversion[1] }}\n enable-cache: false\n\n - run:\n uv pip install --python=${{ matrix.version }} pip\n\n # TODO: remove cython nightly install when cython does a release\n - name: Install nightly Cython\n if: matrix.compiler-pyversion[1] == '3.13t'\n run: |\n pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython\n\n - name: Install build dependencies from PyPI\n run: |\n pip install -r requirements/build_requirements.txt\n\n - name: Install pkg-config\n run: |\n choco install -y --stoponfirstfailure --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite\n echo "PKG_CONFIG_PATH=${{ github.workspace }}/.openblas" >> $env:GITHUB_ENV\n\n\n - name: Install Clang-cl\n if: matrix.compiler-pyversion[0] == 'Clang-cl'\n run: |\n # llvm is preinstalled, but leave\n # this here in case we need to pin the\n # version at some point.\n #choco install llvm -y\n\n - name: Install NumPy (MSVC)\n if: matrix.compiler-pyversion[0] == 'MSVC'\n run: |\n pip install -r requirements/ci_requirements.txt\n spin build --with-scipy-openblas=32 -j2 -- --vsenv\n\n - name: Install NumPy (Clang-cl)\n if: matrix.compiler-pyversion[0] == 'Clang-cl'\n run: |\n "[binaries]","c = 'clang-cl'","cpp = 'clang-cl'","ar = 'llvm-lib'","c_ld = 'lld-link'","cpp_ld = 'lld-link'" | Out-File $PWD/clang-cl-build.ini -Encoding ascii\n pip install -r requirements/ci_requirements.txt\n spin build --with-scipy-openblas=32 -j2 -- --vsenv --native-file=$PWD/clang-cl-build.ini\n\n - name: Meson Log\n shell: bash\n if: ${{ failure() }}\n run: |\n cat build/meson-logs/meson-log.txt\n\n - name: Install test dependencies\n run: |\n python -m pip install -r requirements/test_requirements.txt\n python -m pip install threadpoolctl\n\n - name: Run test suite\n run: |\n spin test -- --timeout=600 --durations=10\n\n msvc_32bit_python_no_openblas:\n name: MSVC, 32-bit Python, no BLAS\n runs-on: windows-2019\n # To enable this job on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n steps:\n - name: Checkout\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - name: Setup Python (32-bit)\n uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: '3.11'\n architecture: 'x86'\n\n - name: Setup MSVC (32-bit)\n uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1\n with:\n architecture: 'x86'\n\n - name: Build and install\n run: |\n python -m pip install . -v -Ccompile-args="-j2" -Csetup-args="-Dallow-noblas=true"\n\n - name: Install test dependencies\n run: |\n python -m pip install -r requirements/test_requirements.txt\n\n - name: Run test suite (fast)\n run: |\n cd tools\n python -m pytest --pyargs numpy -m "not slow" -n2 --timeout=600 --durations=10\n | dataset_sample\yaml\numpy_numpy\.github\workflows\windows.yml | windows.yml | YAML | 4,173 | 0.95 | 0.052632 | 0.063636 | python-kit | 242 | 2024-04-12T13:56:01.006943 | Apache-2.0 | false | 41ba264f73667d18ed2258af4f18c7d4 |
name: Windows Arm64\n\non:\n workflow_dispatch:\n\nenv:\n python_version: 3.12\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}\n cancel-in-progress: true\n\npermissions:\n contents: read # to fetch code (actions/checkout)\n\njobs:\n windows_arm:\n runs-on: windows-2019\n\n # To enable this job on a fork, comment out:\n if: github.repository == 'numpy/numpy'\n steps:\n - name: Checkout\n uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2\n with:\n submodules: recursive\n fetch-tags: true\n persist-credentials: false\n\n - name: Setup Python\n uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0\n with:\n python-version: ${{env.python_version}}\n architecture: x64\n\n - name: Install build dependencies from PyPI\n run: |\n python -m pip install -r requirements/build_requirements.txt\n\n - name: Prepare python\n shell: powershell\n run: |\n $ErrorActionPreference = "Stop"\n\n #Detecting python location and version\n $PythonDir = (Split-Path -Parent (get-command python).Path)\n $PythonVersionParts = ( -split (python -V))\n $PythonVersion = $PythonVersionParts[1]\n\n #Downloading the package for appropriate python version from nuget\n $PythonARM64NugetLink = "https://www.nuget.org/api/v2/package/pythonarm64/$PythonVersion"\n $PythonARM64NugetZip = "nuget_python.zip"\n $PythonARM64NugetDir = "temp_nuget"\n Invoke-WebRequest $PythonARM64NugetLink -OutFile $PythonARM64NugetZip\n\n #Changing the libs folder to enable python libraries to be linked for arm64\n Expand-Archive $PythonARM64NugetZip $PythonARM64NugetDir\n Copy-Item $PythonARM64NugetDir\tools\libs\* $PythonDir\libs\n Remove-Item -Force -Recurse $PythonARM64NugetDir\n Remove-Item -Force $PythonARM64NugetZip\n\n if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }\n\n - name: Prepare Licence\n shell: powershell\n run: |\n $ErrorActionPreference = "Stop"\n\n $CurrentDir = (get-location).Path\n $LicenseFile = "$CurrentDir\LICENSE.txt"\n Set-Content $LicenseFile ([Environment]::NewLine)\n Add-Content $LicenseFile "----"\n Add-Content $LicenseFile ([Environment]::NewLine)\n Add-Content $LicenseFile (Get-Content "$CurrentDir\LICENSES_bundled.txt")\n Add-Content $LicenseFile (Get-Content "$CurrentDir\tools\wheels\LICENSE_win32.txt")\n\n if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }\n\n - name: Wheel build\n shell: powershell\n run: |\n $ErrorActionPreference = "Stop"\n\n #Creating cross compile script for messon subsystem\n $CurrentDir = (get-location)\n $CrossScript = "$CurrentDir\arm64_w64.txt"\n $CrossScriptContent =\n {\n [host_machine]\n system = 'windows'\n subsystem = 'windows'\n kernel = 'nt'\n cpu_family = 'aarch64'\n cpu = 'aarch64'\n endian = 'little'\n\n [binaries]\n c='cl.exe'\n cpp = 'cl.exe'\n\n [properties]\n sizeof_short = 2\n sizeof_int = 4\n sizeof_long = 4\n sizeof_long_long = 8\n sizeof_float = 4\n sizeof_double = 8\n sizeof_long_double = 8\n sizeof_size_t = 8\n sizeof_wchar_t = 2\n sizeof_off_t = 4\n sizeof_Py_intptr_t = 8\n sizeof_PY_LONG_LONG = 8\n longdouble_format = 'IEEE_DOUBLE_LE'\n }\n Set-Content $CrossScript $CrossScriptContent.ToString()\n\n #Setting up cross compilers from MSVC\n $Products = 'Community', 'Professional', 'Enterprise', 'BuildTools' | % { "Microsoft.VisualStudio.Product.$_" }\n $VsInstallPath = (vswhere -products $Products -latest -format json | ConvertFrom-Json).installationPath\n $VSVars = (Get-ChildItem -Path $VsInstallPath -Recurse -Filter "vcvarsamd64_arm64.bat").FullName\n $ScriptingObj = New-Object -ComObject Scripting.FileSystemObject\n $VSVarsShort = $ScriptingObj.GetFile($VSVars).ShortPath\n cmd /c "$VSVarsShort && set" |\n ForEach-Object {\n if ($_ -match "=") {\n $Var = $_.split("=")\n set-item -force -path "ENV:\$($Var[0])" -value "$($Var[1])"\n }\n }\n\n #Building the wheel\n pip wheel . --config-settings=setup-args="--cross-file=$CrossScript"\n\n if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }\n\n - name: Fix wheel\n shell: powershell\n run: |\n $ErrorActionPreference = "Stop"\n\n #Finding whl file\n $CurrentDir = (get-location)\n $WhlName = ((Get-ChildItem -Filter "*.whl").FullName)\n $ZipWhlName = "$CurrentDir\ZipWhlName.zip"\n $UnzippedWhl = "$CurrentDir\unzipedWhl"\n\n #Expanding whl file\n Rename-Item -Path $WhlName $ZipWhlName\n if (Test-Path $UnzippedWhl) {\n Remove-Item -Force -Recurse $UnzippedWhl\n }\n Expand-Archive -Force -Path $ZipWhlName $UnzippedWhl\n\n #Renaming all files to show that their arch is arm64\n Get-ChildItem -Recurse -Path $UnzippedWhl *win_amd64* | Rename-Item -NewName { $_.Name -replace 'win_amd64', 'win_arm64' }\n $DIST_DIR = (Get-ChildItem -Recurse -Path $UnzippedWhl *dist-info).FullName\n\n #Changing amd64 references from metafiles\n (GET-Content $DIST_DIR/RECORD) -replace 'win_amd64', 'win_arm64' | Set-Content $DIST_DIR/RECORD\n (GET-Content $DIST_DIR/WHEEL) -replace 'win_amd64', 'win_arm64' | Set-Content $DIST_DIR/WHEEL\n\n #Packing whl file\n Compress-Archive -Path $UnzippedWhl\* -DestinationPath $ZipWhlName -Force\n $WhlName = $WhlName.Replace("win_amd64", "win_arm64")\n Rename-Item -Path $ZipWhlName $WhlName\n\n if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) { exit $LASTEXITCODE }\n\n - name: Upload Artifacts\n uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2\n with:\n name: ${{ env.python_version }}-win_arm64\n path: ./*.whl\n\n - name: Setup Mamba\n uses: mamba-org/setup-micromamba@0dea6379afdaffa5d528b3d1dabc45da37f443fc\n with:\n # for installation of anaconda-client, required for upload to\n # anaconda.org\n # Note that this step is *after* specific pythons have been used to\n # build and test the wheel\n # for installation of anaconda-client, for upload to anaconda.org\n # environment will be activated after creation, and in future bash steps\n init-shell: bash\n environment-name: upload-env\n create-args: >-\n anaconda-client\n\n # - name: Upload wheels\n # if: success()\n # shell: bash -el {0}\n # # see https://github.com/marketplace/actions/setup-miniconda for why\n # # `-el {0}` is required.\n # env:\n # NUMPY_STAGING_UPLOAD_TOKEN: ${{ secrets.NUMPY_STAGING_UPLOAD_TOKEN }}\n # NUMPY_NIGHTLY_UPLOAD_TOKEN: ${{ secrets.NUMPY_NIGHTLY_UPLOAD_TOKEN }}\n # run: |\n # source tools/wheels/upload_wheels.sh\n # set_upload_vars\n # # trigger an upload to\n # # https://anaconda.org/scientific-python-nightly-wheels/numpy\n # # for cron jobs or "Run workflow" (restricted to main branch).\n # # Tags will upload to\n # # https://anaconda.org/multibuild-wheels-staging/numpy\n # # The tokens were originally generated at anaconda.org\n # upload_wheels\n\n | dataset_sample\yaml\numpy_numpy\.github\workflows\windows_arm64.yml | windows_arm64.yml | YAML | 7,674 | 0.95 | 0.081731 | 0.206897 | react-lib | 590 | 2023-12-22T11:59:20.996968 | MIT | false | 9f44e0b9d3e7d7dcf1d47ccc913359c6 |
modified_clone: &MODIFIED_CLONE\n # makes sure that for a PR the CI runs against a merged main\n clone_script: |\n if [ -z "$CIRRUS_PR" ]; then\n # if you're not in a PR then clone against the branch name that was pushed to.\n git clone --recursive --branch=$CIRRUS_BRANCH https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR\n git reset --hard $CIRRUS_CHANGE_IN_REPO\n else\n # it's a PR so clone the main branch then merge the changes from the PR\n git clone https://x-access-token:${CIRRUS_REPO_CLONE_TOKEN}@github.com/${CIRRUS_REPO_FULL_NAME}.git $CIRRUS_WORKING_DIR\n git fetch origin pull/$CIRRUS_PR/head:pull/$CIRRUS_PR\n \n # CIRRUS_BASE_BRANCH will probably be `main` for the majority of the time\n # However, if you do a PR against a maintenance branch we will want to\n # merge the PR into the maintenance branch, not main\n git checkout $CIRRUS_BASE_BRANCH\n\n # alpine git package needs default user.name and user.email to be set before a merge\n git -c user.email="you@example.com" merge --no-commit pull/$CIRRUS_PR\n git submodule update --init --recursive\n fi\n\n\nfreebsd_test_task:\n use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'\n compute_engine_instance:\n image_project: freebsd-org-cloud-dev\n image: family/freebsd-14-2\n platform: freebsd\n cpu: 1\n memory: 4G\n\n install_devtools_script: |\n pkg install -y git bash ninja ccache blas cblas lapack pkgconf\n pkg install -y python311\n\n <<: *MODIFIED_CLONE\n\n ccache_cache:\n folder: .ccache\n populate_script:\n - mkdir -p .ccache\n fingerprint_key: ccache-freebsd\n\n prepare_env_script: |\n # Create a venv (the `source` command needs bash, not the default sh shell)\n chsh -s /usr/local/bin/bash\n python3.11 -m venv .venv\n source .venv/bin/activate\n # Minimal build and test requirements\n python3.11 -m pip install -U pip\n python3.11 -m pip install meson-python Cython pytest hypothesis\n\n build_script: |\n chsh -s /usr/local/bin/bash\n source .venv/bin/activate\n python3.11 -m pip install . --no-build-isolation -v -Csetup-args="-Dallow-noblas=false"\n\n test_script: |\n chsh -s /usr/local/bin/bash\n source .venv/bin/activate\n cd tools\n python3.11 -m pytest --pyargs numpy -m "not slow"\n ccache -s\n\n on_failure:\n debug_script: |\n cat build/meson-logs/meson-log.txt\n | dataset_sample\yaml\numpy_numpy\tools\ci\cirrus_arm.yml | cirrus_arm.yml | YAML | 2,441 | 0.95 | 0.073529 | 0.157895 | python-kit | 9 | 2024-05-31T15:01:29.644001 | MIT | false | 5639b7c874a5de4181bbabdc68ac658a |
# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where the package manifests are located.\n# Please see the documentation for all configuration options:\n# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates\n\n# docs\n# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file\nversion: 2\nupdates:\n - package-ecosystem: "cargo"\n directory: "/"\n schedule:\n interval: "weekly"\n # We release on Tuesdays and open dependabot PRs will rebase after the\n # version bump and thus consume unnecessary workers during release, thus\n # let's open new ones on Wednesday\n day: "wednesday"\n ignore:\n - dependency-name: "*"\n update-types: ["version-update:semver-patch"]\n groups:\n # Only update polars as a whole as there are many subcrates that need to\n # be updated at once. We explicitly depend on some of them, so batch their\n # updates to not take up dependabot PR slots with dysfunctional PRs\n polars:\n patterns:\n - "polars"\n - "polars-*"\n # uutils/coreutils also versions all their workspace crates the same at the moment\n # Most of them have bleeding edge version requirements (some not)\n # see: https://github.com/uutils/coreutils/blob/main/Cargo.toml\n uutils:\n patterns:\n - "uucore"\n - "uu_*"\n - package-ecosystem: "github-actions"\n directory: "/"\n schedule:\n interval: "weekly"\n day: "wednesday"\n | dataset_sample\yaml\nushell_nushell\.github\dependabot.yml | dependabot.yml | YAML | 1,631 | 0.95 | 0.075 | 0.384615 | react-lib | 996 | 2023-12-12T18:34:49.083329 | BSD-3-Clause | false | 53687f843463289eeb5ce4f8ea42312e |
# A bot for automatically labelling pull requests \n# See https://github.com/actions/labeler\n\ndataframe:\n - changed-files:\n - any-glob-to-any-file:\n - crates/nu_plugin_polars/**\n\nstd-library:\n - changed-files:\n - any-glob-to-any-file:\n - crates/nu-std/**\n\nci:\n - changed-files:\n - any-glob-to-any-file:\n - .github/workflows/**\n\n\nLSP:\n - changed-files:\n - any-glob-to-any-file:\n - crates/nu-lsp/**\n\nparser:\n - changed-files:\n - any-glob-to-any-file:\n - crates/nu-parser/**\n\npr:plugins:\n - changed-files:\n - any-glob-to-any-file:\n # plugins API\n - crates/nu-plugin/**\n - crates/nu-plugin-core/**\n - crates/nu-plugin-engine/**\n - crates/nu-plugin-protocol/**\n - crates/nu-plugin-test-support/**\n # specific plugins (like polars)\n - crates/nu_plugin_*\n | dataset_sample\yaml\nushell_nushell\.github\labeler.yml | labeler.yml | YAML | 836 | 0.8 | 0.025 | 0.121212 | react-lib | 645 | 2023-10-25T04:31:15.020949 | Apache-2.0 | false | 95d47bf7a9e2a6bd4a8e416470b9aa3c |
name: Bug Report\ndescription: Create a report to help us improve\nlabels: ["needs-triage"]\nbody: \n - type: textarea\n id: description\n attributes:\n label: Describe the bug\n description: Thank you for your bug report.\n validations:\n required: true\n - type: textarea\n id: repro\n attributes:\n label: How to reproduce\n description: Steps to reproduce the behavior (including succinct code examples or screenshots of the observed behavior)\n placeholder: |\n 1.\n 2.\n 3.\n validations:\n required: true\n - type: textarea\n id: expected\n attributes:\n label: Expected behavior\n description: A clear and concise description of what you expected to happen.\n placeholder: I expected nu to...\n validations:\n required: true\n - type: textarea\n id: config\n attributes:\n label: Configuration\n description: "Please run `version | transpose key value | to md --pretty` and paste the output to show OS, features, etc."\n placeholder: |\n > version | transpose key value | to md --pretty\n | key | value |\n | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n | version | 0.40.0 |\n | build_os | linux-x86_64 |\n | rust_version | rustc 1.56.1 |\n | cargo_version | cargo 1.56.0 |\n | pkg_version | 0.40.0 |\n | build_time | 1980-01-01 00:00:00 +00:00 |\n | build_rust_channel | release |\n | features | clipboard-cli, ctrlc, dataframe, default, rustyline, term, trash, uuid, which, zip |\n | installed_plugins | binaryview, chart bar, chart line, fetch, from bson, from sqlite, inc, match, post, ps, query json, s3, selector, start, sys, textview, to bson, to sqlite, tree, xpath |\n validations:\n required: true\n | dataset_sample\yaml\nushell_nushell\.github\ISSUE_TEMPLATE\bug_report.yml | bug_report.yml | YAML | 3,343 | 0.85 | 0.02 | 0 | awesome-app | 346 | 2024-03-07T11:51:01.776367 | GPL-3.0 | false | a70d04056f2de0fc66d1a66359df5f19 |
name: Feature Request\ndescription: "When you want a new feature for something that doesn't already exist"\nlabels: ["needs-triage", "enhancement"]\nbody:\n - type: textarea\n id: problem\n attributes:\n label: Related problem\n description: Thank you for your feature request.\n placeholder: |\n A clear and concise description of what the problem is.\n Example: I am trying to do [...] but [...]\n validations:\n required: false\n - type: textarea\n id: desired\n attributes:\n label: "Describe the solution you'd like"\n description: A clear and concise description of what you want to happen.\n validations:\n required: true\n - type: textarea\n id: alternatives\n attributes:\n label: "Describe alternatives you've considered"\n description: "A clear and concise description of any alternative solutions or features you've considered."\n validations:\n required: false\n - type: textarea\n id: context\n attributes:\n label: Additional context and details\n description: Add any other context or screenshots about the feature request here.\n validations:\n required: false\n | dataset_sample\yaml\nushell_nushell\.github\ISSUE_TEMPLATE\feature_request.yml | feature_request.yml | YAML | 1,163 | 0.85 | 0.057143 | 0 | awesome-app | 256 | 2023-08-29T17:48:17.314873 | BSD-3-Clause | false | 796932cc75dcc6fe375f22187eb42349 |
name: Question\ndescription: "When you have a question to ask"\nlabels: "question"\nbody:\n - type: textarea\n id: problem\n attributes:\n label: Question\n description: Leave your question here\n placeholder: |\n A clear and concise question\n Example: Is there any equivalent of bash's $CDPATH in Nu?\n validations:\n required: true\n - type: textarea\n id: context\n attributes:\n label: Additional context and details\n description: Add any other context, screenshots or other media that will help us understand your question here, if needed.\n validations:\n required: false\n | dataset_sample\yaml\nushell_nushell\.github\ISSUE_TEMPLATE\question.yml | question.yml | YAML | 629 | 0.85 | 0.047619 | 0 | python-kit | 564 | 2024-06-14T17:02:30.314017 | BSD-3-Clause | false | bcc90556caf1a6a2478a52b52c8212f8 |
name: Security audit\non:\n pull_request:\n paths:\n - '**/Cargo.toml'\n - '**/Cargo.lock'\n push:\n branches:\n - main\n\nenv:\n RUST_BACKTRACE: 1\n CARGO_TERM_COLOR: always\n CLICOLOR: 1\n\njobs:\n security_audit:\n runs-on: ubuntu-latest\n # Prevent sudden announcement of a new advisory from failing ci:\n continue-on-error: true\n steps:\n - uses: actions/checkout@v4.1.7\n - uses: rustsec/audit-check@v2.0.0\n with:\n token: ${{ secrets.GITHUB_TOKEN }}\n | dataset_sample\yaml\nushell_nushell\.github\workflows\audit.yml | audit.yml | YAML | 498 | 0.8 | 0 | 0.043478 | vue-tools | 358 | 2024-04-27T06:08:06.777714 | MIT | false | 74b5b22eb83f0421a05c52f1362ffddc |
on:\n pull_request:\n push:\n branches:\n - main\n - 'patch-release-*'\n\nname: continuous-integration\n\nenv:\n NUSHELL_CARGO_PROFILE: ci\n NU_LOG_LEVEL: DEBUG\n # If changing these settings also change toolkit.nu\n CLIPPY_OPTIONS: "-D warnings -D clippy::unwrap_used -D clippy::unchecked_duration_subtraction"\n\nconcurrency:\n group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}\n cancel-in-progress: true\n\njobs:\n fmt-clippy:\n strategy:\n fail-fast: true\n matrix:\n # Pinning to Ubuntu 22.04 because building on newer Ubuntu versions causes linux-gnu\n # builds to link against a too-new-for-many-Linux-installs glibc version. Consider\n # revisiting this when 22.04 is closer to EOL (June 2027)\n #\n # Using macOS 13 runner because 14 is based on the M1 and has half as much RAM (7 GB,\n # instead of 14 GB) which is too little for us right now. Revisit when `dfr` commands are\n # removed and we're only building the `polars` plugin instead\n platform: [windows-latest, macos-13, ubuntu-22.04]\n\n runs-on: ${{ matrix.platform }}\n\n steps:\n - uses: actions/checkout@v4.1.7\n\n - name: Setup Rust toolchain and cache\n uses: actions-rust-lang/setup-rust-toolchain@v1.11.0\n\n - name: cargo fmt\n run: cargo fmt --all -- --check\n\n # If changing these settings also change toolkit.nu\n - name: Clippy\n run: cargo clippy --workspace --exclude nu_plugin_* -- $CLIPPY_OPTIONS\n\n # In tests we don't have to deny unwrap\n - name: Clippy of tests\n run: cargo clippy --tests --workspace --exclude nu_plugin_* -- -D warnings\n\n - name: Clippy of benchmarks\n run: cargo clippy --benches --workspace --exclude nu_plugin_* -- -D warnings\n\n tests:\n strategy:\n fail-fast: true\n matrix:\n platform: [windows-latest, macos-latest, ubuntu-22.04]\n\n runs-on: ${{ matrix.platform }}\n\n steps:\n - uses: actions/checkout@v4.1.7\n\n - name: Setup Rust toolchain and cache\n uses: actions-rust-lang/setup-rust-toolchain@v1.11.0\n\n - name: Tests\n run: cargo test --workspace --profile ci --exclude nu_plugin_*\n - name: Check for clean repo\n shell: bash\n run: |\n if [ -n "$(git status --porcelain)" ]; then\n echo "there are changes";\n git status --porcelain\n exit 1\n else\n echo "no changes in working directory";\n fi\n\n std-lib-and-python-virtualenv:\n strategy:\n fail-fast: true\n matrix:\n platform: [ubuntu-22.04, macos-latest, windows-latest]\n py:\n - py\n\n runs-on: ${{ matrix.platform }}\n\n steps:\n - uses: actions/checkout@v4.1.7\n\n - name: Setup Rust toolchain and cache\n uses: actions-rust-lang/setup-rust-toolchain@v1.11.0\n\n - name: Install Nushell\n run: cargo install --path . --locked --force\n\n - name: Standard library tests\n run: nu -c 'use crates/nu-std/testing.nu; testing run-tests --path crates/nu-std'\n\n - name: Ensure that Cargo.toml MSRV and rust-toolchain.toml use the same version\n run: nu .github/workflows/check-msrv.nu\n\n - name: Setup Python\n uses: actions/setup-python@v5\n with:\n python-version: "3.10"\n\n - name: Install virtualenv\n run: pip install virtualenv\n shell: bash\n\n - name: Test Nushell in virtualenv\n run: nu scripts/test_virtualenv.nu\n shell: bash\n\n - name: Check for clean repo\n shell: bash\n run: |\n if [ -n "$(git status --porcelain)" ]; then\n echo "there are changes";\n git status --porcelain\n exit 1\n else\n echo "no changes in working directory";\n fi\n\n plugins:\n strategy:\n fail-fast: true\n matrix:\n # Using macOS 13 runner because 14 is based on the M1 and has half as much RAM (7 GB,\n # instead of 14 GB) which is too little for us right now.\n #\n # Failure occurring with clippy for rust 1.77.2\n platform: [windows-latest, macos-13, ubuntu-22.04]\n\n runs-on: ${{ matrix.platform }}\n\n steps:\n - uses: actions/checkout@v4.1.7\n\n - name: Setup Rust toolchain and cache\n uses: actions-rust-lang/setup-rust-toolchain@v1.11.0\n\n - name: Clippy\n run: cargo clippy --package nu_plugin_* -- $CLIPPY_OPTIONS\n\n - name: Tests\n run: cargo test --profile ci --package nu_plugin_*\n\n - name: Check for clean repo\n shell: bash\n run: |\n if [ -n "$(git status --porcelain)" ]; then\n echo "there are changes";\n git status --porcelain\n exit 1\n else\n echo "no changes in working directory";\n fi\n\n wasm:\n env:\n WASM_OPTIONS: --no-default-features --target wasm32-unknown-unknown\n CLIPPY_CONF_DIR: ${{ github.workspace }}/clippy/wasm/\n\n strategy:\n matrix:\n job:\n - name: Build WASM\n command: cargo build\n args:\n - name: Clippy WASM\n command: cargo clippy\n args: -- $CLIPPY_OPTIONS\n\n name: ${{ matrix.job.name }}\n\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4.1.7\n\n - name: Setup Rust toolchain and cache\n uses: actions-rust-lang/setup-rust-toolchain@v1.11.0\n\n - name: Add wasm32-unknown-unknown target\n run: rustup target add wasm32-unknown-unknown\n\n - run: ${{ matrix.job.command }} -p nu-cmd-base $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-cmd-extra $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-cmd-lang $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-color-config $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-command $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-derive-value $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-engine $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-glob $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-json $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-parser $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-path $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-pretty-hex $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-protocol $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-std $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-system $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-table $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-term-grid $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nu-utils $WASM_OPTIONS ${{ matrix.job.args }}\n - run: ${{ matrix.job.command }} -p nuon $WASM_OPTIONS ${{ matrix.job.args }}\n | dataset_sample\yaml\nushell_nushell\.github\workflows\ci.yml | ci.yml | YAML | 7,234 | 0.8 | 0.04717 | 0.081871 | awesome-app | 149 | 2023-11-10T06:12:19.562683 | GPL-3.0 | false | 4e16617c8b79c7eb9647b283a404de8f |
# Automatically labels PRs based on the configuration file\n# you are probably looking for π `.github/labeler.yml`\nname: Label PRs\n\non:\n - pull_request_target\n\njobs:\n triage:\n permissions:\n contents: read\n pull-requests: write\n runs-on: ubuntu-latest\n if: github.repository_owner == 'nushell'\n steps:\n - uses: actions/labeler@v5\n with:\n repo-token: "${{ secrets.GITHUB_TOKEN }}"\n sync-labels: true | dataset_sample\yaml\nushell_nushell\.github\workflows\labels.yml | labels.yml | YAML | 453 | 0.8 | 0.111111 | 0.117647 | react-lib | 753 | 2024-04-18T06:55:38.603446 | GPL-3.0 | false | d83f7bfbf4d953286e011cd7bb08176a |
# Description:\n# - Add milestone to a merged PR automatically\n# - Add milestone to a closed issue that has a merged PR fix (if any)\n\nname: Milestone Action\non:\n issues:\n types: [closed]\n pull_request_target:\n types: [closed]\n\njobs:\n update-milestone:\n runs-on: ubuntu-latest\n name: Milestone Update\n steps:\n - name: Set Milestone for PR\n uses: hustcer/milestone-action@main\n if: github.event.pull_request.merged == true\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n # Bind milestone to closed issue that has a merged PR fix\n - name: Set Milestone for Issue\n uses: hustcer/milestone-action@v2\n if: github.event.issue.state == 'closed'\n with:\n action: bind-issue\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n | dataset_sample\yaml\nushell_nushell\.github\workflows\milestone.yml | milestone.yml | YAML | 828 | 0.8 | 0.166667 | 0.148148 | react-lib | 606 | 2025-04-01T20:09:53.725012 | MIT | false | 867798d50e0f360d731be4d0a3875c94 |
#\n# REF:\n# 1. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude\n# 2. https://github.com/JasonEtco/create-an-issue\n# 3. https://docs.github.com/en/actions/learn-github-actions/variables\n# 4. https://github.com/actions/github-script\n#\nname: Nightly Build\n\non:\n push:\n branches:\n - nightly # Just for test purpose only with the nightly repo\n # This schedule will run only from the default branch\n schedule:\n - cron: '15 0 * * *' # run at 00:15 AM UTC\n\ndefaults:\n run:\n shell: bash\n\njobs:\n prepare:\n name: Prepare\n runs-on: ubuntu-latest\n # This job is required by the release job, so we should make it run both from Nushell repo and nightly repo\n # if: github.repository == 'nushell/nightly'\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n if: github.repository == 'nushell/nightly'\n with:\n ref: main\n fetch-depth: 0\n # Configure PAT here: https://github.com/settings/tokens for the push operation in the following steps\n token: ${{ secrets.WORKFLOW_TOKEN }}\n\n - name: Setup Nushell\n uses: hustcer/setup-nu@v3\n if: github.repository == 'nushell/nightly'\n with:\n version: 0.101.0\n\n # Synchronize the main branch of nightly repo with the main branch of Nushell official repo\n - name: Prepare for Nightly Release\n shell: nu {0}\n if: github.repository == 'nushell/nightly'\n run: |\n cd $env.GITHUB_WORKSPACE\n git checkout main\n # We can't push if no user name and email are configured\n git config user.name 'hustcer'\n git config user.email 'hustcer@outlook.com'\n git pull origin main\n git remote add src https://github.com/nushell/nushell.git\n git fetch src main\n # All the changes will be overwritten by the upstream main branch\n git reset --hard src/main\n git push origin main -f\n let sha_short = (git rev-parse --short origin/main | str trim | str substring 0..7)\n let tag_name = $'nightly-($sha_short)'\n if (git ls-remote --tags origin $tag_name | is-empty) {\n git tag -a $tag_name -m $'Nightly build from ($sha_short)'\n git push origin --tags\n }\n\n standard:\n name: Nu\n needs: prepare\n strategy:\n fail-fast: false\n matrix:\n target:\n - aarch64-apple-darwin\n - x86_64-apple-darwin\n - x86_64-pc-windows-msvc\n - aarch64-pc-windows-msvc\n - x86_64-unknown-linux-gnu\n - x86_64-unknown-linux-musl\n - aarch64-unknown-linux-gnu\n - aarch64-unknown-linux-musl\n - armv7-unknown-linux-gnueabihf\n - armv7-unknown-linux-musleabihf\n - riscv64gc-unknown-linux-gnu\n - loongarch64-unknown-linux-gnu\n extra: ['bin']\n include:\n - target: aarch64-apple-darwin\n os: macos-latest\n - target: x86_64-apple-darwin\n os: macos-latest\n - target: x86_64-pc-windows-msvc\n extra: 'bin'\n os: windows-latest\n - target: x86_64-pc-windows-msvc\n extra: msi\n os: windows-latest\n - target: aarch64-pc-windows-msvc\n extra: 'bin'\n os: windows-latest\n - target: aarch64-pc-windows-msvc\n extra: msi\n os: windows-latest\n - target: x86_64-unknown-linux-gnu\n os: ubuntu-22.04\n - target: x86_64-unknown-linux-musl\n os: ubuntu-22.04\n - target: aarch64-unknown-linux-gnu\n os: ubuntu-22.04\n - target: aarch64-unknown-linux-musl\n os: ubuntu-22.04\n - target: armv7-unknown-linux-gnueabihf\n os: ubuntu-22.04\n - target: armv7-unknown-linux-musleabihf\n os: ubuntu-22.04\n - target: riscv64gc-unknown-linux-gnu\n os: ubuntu-22.04\n - target: loongarch64-unknown-linux-gnu\n os: ubuntu-22.04\n\n runs-on: ${{matrix.os}}\n\n steps:\n - uses: actions/checkout@v4\n with:\n ref: main\n fetch-depth: 0\n\n - name: Update Rust Toolchain Target\n run: |\n echo "targets = ['${{matrix.target}}']" >> rust-toolchain.toml\n\n - name: Setup Rust toolchain and cache\n uses: actions-rust-lang/setup-rust-toolchain@v1.11.0\n # WARN: Keep the rustflags to prevent from the winget submission error: `CAQuietExec: Error 0xc0000135`\n with:\n rustflags: ''\n\n - name: Setup Nushell\n uses: hustcer/setup-nu@v3\n with:\n version: 0.101.0\n\n - name: Release Nu Binary\n id: nu\n run: nu .github/workflows/release-pkg.nu\n env:\n OS: ${{ matrix.os }}\n REF: ${{ github.ref }}\n TARGET: ${{ matrix.target }}\n _EXTRA_: ${{ matrix.extra }}\n\n - name: Create an Issue for Release Failure\n if: ${{ failure() }}\n uses: JasonEtco/create-an-issue@v2.9.2\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n with:\n update_existing: true\n search_existing: open\n filename: .github/AUTO_ISSUE_TEMPLATE/nightly-build-fail.md\n\n - name: Set Outputs of Short SHA\n id: vars\n run: |\n echo "date=$(date -u +'%Y-%m-%d')" >> $GITHUB_OUTPUT\n sha_short=$(git rev-parse --short HEAD)\n echo "sha_short=${sha_short:0:7}" >> $GITHUB_OUTPUT\n\n # REF: https://github.com/marketplace/actions/gh-release\n # Create a release only in nushell/nightly repo\n - name: Publish Archive\n uses: softprops/action-gh-release@v2.0.9\n if: ${{ startsWith(github.repository, 'nushell/nightly') }}\n with:\n prerelease: true\n files: ${{ steps.nu.outputs.archive }}\n tag_name: nightly-${{ steps.vars.outputs.sha_short }}\n name: Nu-nightly-${{ steps.vars.outputs.date }}-${{ steps.vars.outputs.sha_short }}\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n cleanup:\n name: Cleanup\n # Should only run in nushell/nightly repo\n if: github.repository == 'nushell/nightly'\n runs-on: ubuntu-latest\n steps:\n # Sleep for 30 minutes, waiting for the release to be published\n - name: Waiting for Release\n run: sleep 1800\n\n - uses: actions/checkout@v4\n with:\n ref: main\n\n - name: Setup Nushell\n uses: hustcer/setup-nu@v3\n with:\n version: 0.101.0\n\n # Keep the last a few releases\n - name: Delete Older Releases\n shell: nu {0}\n run: |\n let KEEP_COUNT = 10\n let deprecated = (http get https://api.github.com/repos/nushell/nightly/releases | sort-by -r created_at | select tag_name id | range $KEEP_COUNT..)\n for release in $deprecated {\n print $'Deleting tag ($release.tag_name)'\n git push origin --delete $release.tag_name\n print $'Deleting release ($release.tag_name)'\n let delete_url = $'https://api.github.com/repos/nushell/nightly/releases/($release.id)'\n let version = "X-GitHub-Api-Version: 2022-11-28"\n let accept = "Accept: application/vnd.github+json"\n let auth = "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\n # http delete $delete_url -H $version -H $auth -H $accept\n curl -L -X DELETE -H $accept -H $auth -H $version $delete_url\n }\n | dataset_sample\yaml\nushell_nushell\.github\workflows\nightly-build.yml | nightly-build.yml | YAML | 7,378 | 0.95 | 0.082569 | 0.105528 | node-utils | 89 | 2024-01-12T11:01:13.379131 | GPL-3.0 | false | 3d32b28cb215e3a76059983e4c247544 |
#\n# REF:\n# 1. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude\n#\nname: Create Release Draft\n\non:\n workflow_dispatch:\n push:\n tags:\n - '[0-9]+.[0-9]+.[0-9]+*'\n - '!*nightly*' # Don't trigger release for nightly tags\n\ndefaults:\n run:\n shell: bash\n\njobs:\n release:\n name: Nu\n\n strategy:\n fail-fast: false\n matrix:\n target:\n - aarch64-apple-darwin\n - x86_64-apple-darwin\n - x86_64-pc-windows-msvc\n - aarch64-pc-windows-msvc\n - x86_64-unknown-linux-gnu\n - x86_64-unknown-linux-musl\n - aarch64-unknown-linux-gnu\n - aarch64-unknown-linux-musl\n - armv7-unknown-linux-gnueabihf\n - armv7-unknown-linux-musleabihf\n - riscv64gc-unknown-linux-gnu\n - loongarch64-unknown-linux-gnu\n extra: ['bin']\n include:\n - target: aarch64-apple-darwin\n os: macos-latest\n - target: x86_64-apple-darwin\n os: macos-latest\n - target: x86_64-pc-windows-msvc\n extra: 'bin'\n os: windows-latest\n - target: x86_64-pc-windows-msvc\n extra: msi\n os: windows-latest\n - target: aarch64-pc-windows-msvc\n extra: 'bin'\n os: windows-latest\n - target: aarch64-pc-windows-msvc\n extra: msi\n os: windows-latest\n - target: x86_64-unknown-linux-gnu\n os: ubuntu-22.04\n - target: x86_64-unknown-linux-musl\n os: ubuntu-22.04\n - target: aarch64-unknown-linux-gnu\n os: ubuntu-22.04\n - target: aarch64-unknown-linux-musl\n os: ubuntu-22.04\n - target: armv7-unknown-linux-gnueabihf\n os: ubuntu-22.04\n - target: armv7-unknown-linux-musleabihf\n os: ubuntu-22.04\n - target: riscv64gc-unknown-linux-gnu\n os: ubuntu-22.04\n - target: loongarch64-unknown-linux-gnu\n os: ubuntu-22.04\n\n runs-on: ${{matrix.os}}\n\n steps:\n - uses: actions/checkout@v4\n\n - name: Update Rust Toolchain Target\n run: |\n echo "targets = ['${{matrix.target}}']" >> rust-toolchain.toml\n\n - name: Setup Rust toolchain\n uses: actions-rust-lang/setup-rust-toolchain@v1.11.0\n # WARN: Keep the rustflags to prevent from the winget submission error: `CAQuietExec: Error 0xc0000135`\n with:\n cache: false\n rustflags: ''\n\n - name: Setup Nushell\n uses: hustcer/setup-nu@v3\n with:\n version: 0.101.0\n\n - name: Release Nu Binary\n id: nu\n run: nu .github/workflows/release-pkg.nu\n env:\n OS: ${{ matrix.os }}\n REF: ${{ github.ref }}\n TARGET: ${{ matrix.target }}\n _EXTRA_: ${{ matrix.extra }}\n\n # WARN: Don't upgrade this action due to the release per asset issue.\n # See: https://github.com/softprops/action-gh-release/issues/445\n - name: Publish Archive\n uses: softprops/action-gh-release@v2.0.5\n if: ${{ startsWith(github.ref, 'refs/tags/') }}\n with:\n draft: true\n files: ${{ steps.nu.outputs.archive }}\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n\n sha256sum:\n needs: release\n name: Create Sha256sum\n runs-on: ubuntu-latest\n steps:\n - name: Download Release Archives\n env:\n GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n run: >-\n gh release download ${{ github.ref_name }}\n --repo ${{ github.repository }}\n --pattern '*'\n --dir release\n - name: Create Checksums\n run: cd release && shasum -a 256 * > ../SHA256SUMS\n - name: Publish Checksums\n uses: softprops/action-gh-release@v2.0.5\n with:\n draft: true\n files: SHA256SUMS\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n | dataset_sample\yaml\nushell_nushell\.github\workflows\release.yml | release.yml | YAML | 3,816 | 0.8 | 0.022222 | 0.056911 | node-utils | 338 | 2024-09-18T22:20:24.303913 | Apache-2.0 | false | 8273ce6567f40f2c5f27823b6cd7a758 |
name: Typos\non: [pull_request]\n\njobs:\n run:\n name: Spell Check with Typos\n runs-on: ubuntu-latest\n steps:\n - name: Checkout Actions Repository\n uses: actions/checkout@v4.1.7\n\n - name: Check spelling\n uses: crate-ci/typos@v1.31.1\n | dataset_sample\yaml\nushell_nushell\.github\workflows\typos.yml | typos.yml | YAML | 263 | 0.7 | 0 | 0 | vue-tools | 646 | 2025-04-28T09:20:00.872508 | Apache-2.0 | false | 6332c5ee523f8ffb2b0a6cf0c6d4908d |
name: Submit Nushell package to Windows Package Manager Community Repository\n\non:\n release:\n types: [released]\n workflow_dispatch:\n inputs:\n tag_name:\n description: 'Specific tag name'\n required: true\n type: string\n\njobs:\n\n winget:\n name: Publish winget package\n runs-on: ubuntu-latest\n steps:\n - name: Submit package to Windows Package Manager Community Repository\n uses: vedantmgoyal2009/winget-releaser@v2\n with:\n identifier: Nushell.Nushell\n # Exclude all `*-msvc-full.msi` full release files,\n # and only the default `*msvc.msi` files will be included\n installers-regex: 'msvc\.msi$'\n version: ${{ inputs.tag_name || github.event.release.tag_name }}\n release-tag: ${{ inputs.tag_name || github.event.release.tag_name }}\n token: ${{ secrets.NUSHELL_PAT }}\n fork-user: fdncred\n | dataset_sample\yaml\nushell_nushell\.github\workflows\winget-submission.yml | winget-submission.yml | YAML | 915 | 0.95 | 0 | 0.076923 | node-utils | 588 | 2023-10-08T09:37:28.633740 | BSD-3-Clause | false | 2d98c4a855424977939fef8816ceeae9 |
image: Visual Studio 2017\n\nenvironment:\n global:\n PROJECT_NAME: nushell\n RUST_BACKTRACE: 1\n matrix:\n - TARGET: x86_64-pc-windows-msvc\n CHANNEL: nightly\n BITS: 64\n\ninstall:\n - set PATH=C:\msys64\mingw%BITS%\bin;C:\msys64\usr\bin;%PATH%\n - curl -sSf -o rustup-init.exe https://win.rustup.rs\n # Install rust\n - rustup-init.exe -y --default-host %TARGET% --default-toolchain %CHANNEL%-%TARGET%\n - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin\n # Required for Racer autoconfiguration\n - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"\n\n\nbuild: false\n\ntest_script:\n # compile #[cfg(not(test))] code\n - cargo build --verbose\n - cargo test --all --verbose\n\ncache:\n - target -> Cargo.lock\n - C:\Users\appveyor\.cargo\registry -> Cargo.lock\n | dataset_sample\yaml\nushell_nushell\tests\fixtures\formats\appveyor.yml | appveyor.yml | YAML | 816 | 0.8 | 0.032258 | 0.12 | awesome-app | 174 | 2023-08-05T11:34:39.833380 | Apache-2.0 | true | a4cd3e2f0b09195932bc6d7292c248bb |
configured_endpoints: 97\nopenapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-8b68ae6b807dca92e914da1dd9e835a20f69b075e79102a264367fd7fddddb33.yml\nopenapi_spec_hash: b6ade5b1a6327339e6669e1134de2d03\nconfig_hash: b597cd9a31e9e5ec709e2eefb4c54122\n | dataset_sample\yaml\openai_openai-python\.stats.yml | .stats.yml | YAML | 285 | 0.8 | 0 | 0 | awesome-app | 771 | 2025-04-21T00:11:34.356661 | Apache-2.0 | false | 45b0edcdf554f8b6df6c9088378df6b7 |
version: 0.2\n\nphases:\n install:\n runtime-versions:\n php: 7.3\n commands:\n - composer install\n post_build:\n commands:\n # Do not remove this statement. This command is required for AWS CodeStar projects.\n # Update the AWS Partition, AWS Region, account ID and project ID in the project ARN in template-configuration.json file so AWS CloudFormation can tag project resources.\n - sed -i.bak 's/\$PARTITION\$/'${PARTITION}'/g;s/\$AWS_REGION\$/'${AWS_REGION}'/g;s/\$ACCOUNT_ID\$/'${ACCOUNT_ID}'/g;s/\$PROJECT_ID\$/'${PROJECT_ID}'/g' template-configuration.json\n\nartifacts:\n files:\n - '**/*'\n - 'template-configuration.json'\n | dataset_sample\yaml\opencart_opencart\buildspec.yml | buildspec.yml | YAML | 660 | 0.95 | 0.055556 | 0.125 | node-utils | 105 | 2023-08-21T20:02:49.540735 | Apache-2.0 | false | 86980759a3df3b0bc22e9b553a301a9d |
preserve_hierarchy: 1\nfiles:\n - source: upload/admin/language/en-gb/**/*.php\n translation: admin/**/%file_name%.%file_extension%\n - source: upload/catalog/language/en-gb/**/*.php\n translation: catalog/**/%file_name%.%file_extension%\n - source: upload/install/language/en-gb/**/*.php\n translation: install/**/%file_name%.%file_extension%\n - source: upload/extension/opencart/admin/language/en-gb/**/*.php\n translation: extension/opencart/admin/**/%file_name%.%file_extension%\n - source: upload/extension/opencart/catalog/language/en-gb/**/*.php\n translation: extension/opencart/catalog/**/%file_name%.%file_extension%\n | dataset_sample\yaml\opencart_opencart\crowdin.yml | crowdin.yml | YAML | 637 | 0.8 | 0 | 0 | node-utils | 134 | 2025-05-09T06:22:08.037121 | BSD-3-Clause | false | 94ee3d47170174c106f917ad2f36171f |
version: '3'\nservices:\n opencart:\n build: tools\n user: 1000:1000\n ports:\n - "80:80"\n volumes:\n - ./upload:/var/www/html\n depends_on:\n - mysql\n command: >\n bash -c "if [ ! -f /var/www/html/install.lock ]; then\n wait-for-it mysql:3306 -t 60 &&\n cp config-dist.php config.php\n cp admin/config-dist.php admin/config.php\n php /var/www/html/install/cli_install.php install --username admin --password admin --email email@example.com --http_server http://localhost/ --db_driver mysqli --db_hostname mysql --db_username root --db_password opencart --db_database opencart --db_port 3306 --db_prefix oc_;\n touch /var/www/html/install.lock;\n fi &&\n apache2-foreground"\n\n mysql:\n image: mysql:5.7\n ports:\n - "3306:3306"\n environment:\n - MYSQL_ROOT_PASSWORD=opencart\n - MYSQL_DATABASE=opencart\n\n adminer:\n image: adminer:latest\n environment:\n ADMINER_DEFAULT_SERVER: mysql\n depends_on:\n - mysql\n ports:\n - "8080:8080"\n\n redis:\n image: redis:latest\n\n memcached:\n image: memcached:latest\n\n postgres:\n image: postgres:latest\n environment:\n - POSTGRES_USER=postgres\n - POSTGRES_PASSWORD=opencart\n - POSTGRES_DB=opencart\n | dataset_sample\yaml\opencart_opencart\docker-compose.yml | docker-compose.yml | YAML | 1,333 | 0.8 | 0.04 | 0 | awesome-app | 415 | 2024-11-06T01:15:10.723119 | Apache-2.0 | false | 1ee3b1afe87c95788ce145f90f3e6c4c |
stages:\n - test\n - build\n - publish\n - optional\n\nimage: ${REGISTRY}/parity-ci-linux:latest\n\nvariables:\n GIT_STRATEGY: fetch\n GIT_SUBMODULE_STRATEGY: recursive\n GIT_DEPTH: 3\n CI_SERVER_NAME: "GitLab CI"\n CARGO_HOME: "/ci-cache/${CI_PROJECT_NAME}/cargo/${CI_JOB_NAME}"\n CARGO_TARGET: x86_64-unknown-linux-gnu\n CARGO_INCREMENTAL: 0\n REGISTRY: registry.parity.io/parity/infrastructure/scripts\n\n.releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries")\n only: &releaseable_branches\n - stable\n - tags\n - schedules\n\n.collect_artifacts: &collect_artifacts\n artifacts:\n name: "${CI_JOB_NAME}_${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}"\n when: on_success\n expire_in: 1 mos\n paths:\n - artifacts/\n - tools/\n\n.docker-cache-status: &docker-cache-status\n dependencies: []\n interruptible: true\n before_script:\n - rustup show\n - cargo --version\n retry:\n max: 2\n when:\n - runner_system_failure\n - unknown_failure\n - api_failure\n tags:\n - linux-docker\n\n.build-on-linux: &build-on-linux\n stage: build\n <<: *docker-cache-status\n <<: *collect_artifacts\n script:\n - scripts/gitlab/build-linux.sh\n after_script:\n - mkdir -p tools\n - cp -r scripts/docker/hub/* ./tools\n - cp scripts/gitlab/publish-snap.sh ./tools\n - cp scripts/gitlab/publish-onchain.sh ./tools\n - cp scripts/gitlab/safe-curl.sh ./tools\n - echo v"$(sed -r -n '1,/^version/s/^version\s*=\s*"([^"]+)".*$/\1/p' Cargo.toml)" |\n tee ./tools/VERSION\n - echo "$(sed -r -n '1,/^track/s/^track\s*=\s*"([^"]+)".*$/\1/p' ./util/version/Cargo.toml)" |\n tee ./tools/TRACK\n\n\ncargo-check 0 3:\n stage: test\n <<: *docker-cache-status\n script:\n - time cargo check --target $CARGO_TARGET --locked --no-default-features --verbose --color=always\n - sccache --show-stats\n\ncargo-check 1 3:\n stage: test\n <<: *docker-cache-status\n script:\n - time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --no-default-features --verbose --color=always\n - sccache --show-stats\n\ncargo-check 2 3:\n stage: test\n <<: *docker-cache-status\n script:\n - time cargo check --target $CARGO_TARGET --locked --manifest-path util/io/Cargo.toml --features "mio" --verbose --color=always\n - sccache --show-stats\n\ncargo-check-evmbin:\n stage: test\n <<: *docker-cache-status\n script:\n - time cargo check -p evmbin --target $CARGO_TARGET --locked --verbose --color=always\n - sccache --show-stats\n\ncargo-check-benches:\n stage: test\n <<: *docker-cache-status\n script:\n - time cargo check --all --benches --target $CARGO_TARGET --locked --verbose --color=always\n - sccache --show-stats\n\ncargo-audit:\n stage: test\n <<: *docker-cache-status\n script:\n - cargo audit\n allow_failure: true # failed cargo audit shouldn't prevent a PR from being merged\n\nvalidate-chainspecs:\n stage: test\n <<: *docker-cache-status\n script:\n - ./scripts/gitlab/validate-chainspecs.sh\n\ntest-linux:\n stage: build\n <<: *docker-cache-status\n script:\n - ./scripts/gitlab/test-linux.sh stable\n\ntest-linux-beta:\n stage: build\n only: *releaseable_branches\n <<: *docker-cache-status\n script:\n - ./scripts/gitlab/test-linux.sh beta\n\ntest-linux-nightly:\n stage: build\n only: *releaseable_branches\n <<: *docker-cache-status\n script:\n - ./scripts/gitlab/test-linux.sh nightly\n allow_failure: true\n\nbuild-linux:\n <<: *build-on-linux\n only: *releaseable_branches\n\nbuild-linux-i386:\n <<: *build-on-linux\n only: *releaseable_branches\n image: ${REGISTRY}/parity-ci-i386:latest\n variables:\n CARGO_TARGET: i686-unknown-linux-gnu\n\nbuild-linux-arm64:\n <<: *build-on-linux\n only: *releaseable_branches\n image: ${REGISTRY}/parity-ci-arm64:latest\n variables:\n CARGO_TARGET: aarch64-unknown-linux-gnu\n\nbuild-linux-armhf:\n <<: *build-on-linux\n only: *releaseable_branches\n image: ${REGISTRY}/parity-ci-armhf:latest\n variables:\n CARGO_TARGET: armv7-unknown-linux-gnueabihf\n\nbuild-darwin:\n stage: build\n <<: *collect_artifacts\n only: *releaseable_branches\n variables:\n CARGO_TARGET: x86_64-apple-darwin\n CARGO_HOME: "${CI_PROJECT_DIR}/.cargo"\n script:\n - scripts/gitlab/build-linux.sh\n tags:\n - rust-osx\n\nbuild-windows:\n stage: build\n <<: *collect_artifacts\n only: *releaseable_branches\n variables:\n CARGO_TARGET: x86_64-pc-windows-msvc\n CARGO_HOME: "C:/ci-cache/parity-ethereum/cargo/$CI_JOB_NAME"\n GIT_SUBMODULE_STRATEGY: none\n script:\n - sh scripts/gitlab/build-windows.sh\n tags:\n - rust-windows\n\npublish-docker:\n stage: publish\n only: *releaseable_branches\n except:\n - nightly\n when: manual\n dependencies:\n - build-linux\n environment:\n name: parity-build\n cache: {}\n image: docker:stable\n services:\n - docker:dind\n variables:\n GIT_STRATEGY: none\n DOCKER_HOST: tcp://localhost:2375\n DOCKER_DRIVER: overlay2\n GIT_STRATEGY: none\n # DOCKERFILE: tools/Dockerfile\n # CONTAINER_IMAGE: parity/parity\n script:\n - ./tools/publish-docker.sh\n tags:\n - kubernetes-parity-build\n\npublish-snap-nightly: &publish-snap\n stage: publish\n only:\n - nightly\n image: snapcore/snapcraft\n variables:\n GIT_STRATEGY: none\n BUILD_ARCH: amd64\n cache: {}\n dependencies:\n - build-linux\n tags:\n - linux-docker\n script:\n - ./tools/publish-snap.sh\n\npublish-snap-manually:\n <<: *publish-snap\n only: *releaseable_branches\n when: manual\n\npublish-snap-i386-nightly: &publish-snap-i386\n <<: *publish-snap\n variables:\n BUILD_ARCH: i386\n CARGO_TARGET: i686-unknown-linux-gnu\n dependencies:\n - build-linux-i386\n\npublish-snap-i386-manually:\n <<: *publish-snap-i386\n only: *releaseable_branches\n when: manual\n\npublish-snap-arm64-nightly: &publish-snap-arm64\n <<: *publish-snap\n variables:\n BUILD_ARCH: arm64\n CARGO_TARGET: aarch64-unknown-linux-gnu\n dependencies:\n - build-linux-arm64\n\npublish-snap-arm64-manually:\n <<: *publish-snap-arm64\n only: *releaseable_branches\n when: manual\n\npublish-snap-armhf-nightly: &publish-snap-armhf\n <<: *publish-snap\n variables:\n BUILD_ARCH: armhf\n CARGO_TARGET: armv7-unknown-linux-gnueabihf\n dependencies:\n - build-linux-armhf\n\npublish-snap-armhf-manually:\n <<: *publish-snap-armhf\n only: *releaseable_branches\n when: manual\n\npublish-onchain-nightly: &publish-onchain\n stage: publish\n only:\n - nightly\n cache: {}\n variables:\n GIT_STRATEGY: none\n dependencies:\n - build-linux\n - build-darwin\n - build-windows\n script:\n - ./tools/publish-onchain.sh\n tags:\n - linux-docker\n\npublish-onchain-manually:\n <<: *publish-onchain\n only: *releaseable_branches\n when: manual\n\npublish-release-awss3-nightly: &publish-release-awss3\n image: ${REGISTRY}/awscli:latest\n stage: publish\n only:\n - nightly\n variables:\n GIT_STRATEGY: none\n cache: {}\n dependencies:\n - build-linux\n - build-darwin\n - build-windows\n script:\n - echo "__________Push binaries to AWS S3____________"\n - case "${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}" in\n (stable|nightly)\n export BUCKET=releases.parity.io/ethereum;\n ;;\n (*)\n export BUCKET=builds-parity;\n ;;\n esac\n - aws s3 sync ./artifacts s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}}/\n - echo "__________Read from S3____________"\n - aws s3 ls s3://${BUCKET}/${SCHEDULE_TAG:-${CI_COMMIT_REF_NAME}} --recursive --human-readable --summarize\n tags:\n - linux-docker\n\npublish-release-awss3-manually:\n <<: *publish-release-awss3\n only: *releaseable_branches\n when: manual\n\npublish-docs:\n stage: publish\n image: ${REGISTRY}/parity-ci-docs:latest\n only:\n - tags\n except:\n - nightly\n when: manual\n cache: {}\n dependencies: []\n script:\n - scripts/gitlab/publish-docs.sh\n tags:\n - linux-docker\n allow_failure: true\n\npublish-av-whitelist:\n stage: publish\n variables:\n GIT_STRATEGY: none\n only: *releaseable_branches\n except:\n - nightly\n when: manual\n cache: {}\n dependencies:\n - build-windows\n script:\n - scripts/gitlab/publish-av-whitelists.sh\n tags:\n - linux-docker\n | dataset_sample\yaml\openethereum_parity-ethereum\.gitlab-ci.yml | .gitlab-ci.yml | YAML | 11,313 | 0.8 | 0.002809 | 0.006289 | python-kit | 249 | 2024-03-25T08:37:46.976305 | MIT | false | 10eacf3b448d288ee5d72e101dea2e3c |
sudo: false\nlanguage: rust\nbranches:\n only:\n - master\nmatrix:\n fast_finish: false\n include:\n - rust: stable\n - rust: beta\n - rust: nightly\nafter_success: |\n [ $TRAVIS_BRANCH = master ] &&\n [ $TRAVIS_PULL_REQUEST = false ] &&\n [ $TRAVIS_RUST_VERSION = stable ] &&\n cargo doc --no-deps --verbose &&\n echo '<meta http-equiv=refresh content=0;url=ethkey/index.html>' > target/doc/index.html &&\n pip install --user ghp-import &&\n /home/travis/.local/bin/ghp-import -n target/doc &&\n git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages\nenv:\n global:\n - secure: LBkFAH5fAhzHRP7kYQZnOCavOuPS2vEDv49KGfTsY/7MmW0De4c0sz0a3/0IdFqqIMLYLV2uMO86S0p6FBaq6/GIdobLsGZZ3cFReYFI+vb8sylYF/+D/aQ/UOjpEOD8HP6G3YmV5buSyL8uiPlmYbqwBAe4z6ELEbh/16gRuIqQLYQtpYPxMCD3tZzSux81b45K2khETZ7E+ap3LUG3rFTXxjEgx9leIZlVY+Qk4U5D9gFnJnjmxDPyIqzn2dORnw5jcpp3eSUEvSvSgjz4TAVg7Gw789jDl2dyr26U1wp1E5bB9AqZVYOb4l8vcQ6QiHrCvu7Wgl32O6XYkwMjDaDUB68bm5MTsUrwDWgKGx4xeurIBil5doHFlCGZ98RrzPxdgoCd6hCI459dA8jEwdXAfOkZ80RycZlryHCwn68x3dlnJoqVyg8viYo6H6G0GdH/dIhuwbnLDdWZsODehN8eJEy9KKQ4tPp+PjBcgKm1Wz5MzKFSIwfFInic7hjTVXGozHSvgvXJE0BI2bPbjVNCdZa5kGAAUAhBNXyTn7PbC7hYbmwAalzaOIjoYcdQLmUEz2J2gSOK8xW2gMU0Z2I+IylA0oh8xB/r2Q5sqLHT3LPLdzoETsyzaQjWFcFdXdsbbcG59DnFC9s2Jq7KqeODp6EJG4cw0ofKpBuDRes=\n | dataset_sample\yaml\openethereum_parity-ethereum\accounts\ethkey\.travis.yml | .travis.yml | YAML | 1,282 | 0.95 | 0 | 0 | vue-tools | 962 | 2024-12-05T01:51:02.240717 | BSD-3-Clause | false | 1ac81846c833fa30d553ba8823115302 |
sudo: false\nlanguage: rust\nbranches:\n only:\n - master\nmatrix:\n fast_finish: false\n include:\n - rust: stable\n - rust: beta\n - rust: nightly\nafter_success: |\n [ $TRAVIS_BRANCH = master ] &&\n [ $TRAVIS_PULL_REQUEST = false ] &&\n [ $TRAVIS_RUST_VERSION = stable ] &&\n cargo doc --no-deps --verbose &&\n echo '<meta http-equiv=refresh content=0;url=ethkey/index.html>' > target/doc/index.html &&\n pip install --user ghp-import &&\n /home/travis/.local/bin/ghp-import -n target/doc &&\n git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages\nenv:\n global:\n - secure: C4l7WR0jS84WNmd3MvmpPXQz4wRh4CLDS6bP3BqSHXadz8FPKejtMJZscLYAk5kIkDcVsTAYb88RsEFRrYOA4wkS6vhZBtryYRaJ68MlkyEU/77SYwm86rkQINIDw65O73dUD5LbWWCUoYkenGu26u/UnfayHfJBAyKw5IHkVKf6eDqu7E8ojKSEOXbWgBHjq6uixI8IESb15UjIE0AQ1Od+6cqhsz/caPhTMT3CJGjoCoVGWChwWSQZ+Ppb+xB83C/1h58UVwE9sZEyIPKwVP6socnHPmtR+VEUI6a7YIsOk6ZadKLtyy4523w4HqHNx1/dYjmsknbGpkF4D0DRp5L3D4t4J6URCkJIHfSRrBF5l2QbLMMuSf+KWMWuFOrOF5DBryobRKAVmIL5AjfvFsxtBNzYLPyVBs0ntbPuN5WeUPhadam00za9Z1ZvOUJxfNfyy9R67u6FdD9xkw2m/9hO7KJLDeZ4TSCRFrzfl/7WQprfjCwhZ+reKPgHH0Ufy1/Kh/WEuEBfZDa+z3mWWHlslqH2uBPH3+pvhzdVQGLB/5GZdJNeg/nJYJDCqHyWUKxkw+OMSvI0J8W0GiHV4TuY9V3p+rYjU2Zj69u3/xO/IvKrFtB9xdeJMrLiFQ2cD5vgzQOLCKo80f53NitUjdVSoWrY/NcYopBU4VHZMlk=\n | dataset_sample\yaml\openethereum_parity-ethereum\accounts\ethstore\.travis.yml | .travis.yml | YAML | 1,282 | 0.95 | 0 | 0 | python-kit | 566 | 2024-01-12T19:31:01.315323 | BSD-3-Clause | false | 42289ccb9d2da36feb10097cfdb22593 |
version: 2\nupdates:\n - package-ecosystem: "github-actions"\n directory: "/"\n schedule:\n interval: "weekly"\n labels:\n - "π€ Dependencies" | dataset_sample\yaml\openobserve_openobserve\.github\dependabot.yml | dependabot.yml | YAML | 157 | 0.7 | 0 | 0 | awesome-app | 769 | 2023-08-17T23:16:26.439945 | GPL-3.0 | false | 0f4cb1d764f2d27c30495b4b35d6599f |
name: Security audit\non:\n push:\n\njobs:\n security_audit:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: taiki-e/install-action@v2\n with:\n tool: cargo-audit\n - name: run cargo audit\n run: cargo audit\n | dataset_sample\yaml\openobserve_openobserve\.github\workflows\audit-checker.yml | audit-checker.yml | YAML | 267 | 0.7 | 0 | 0 | awesome-app | 857 | 2024-03-23T00:12:55.489631 | GPL-3.0 | false | 6547fa47af8c86a742da9e02243d0b06 |
name: "Licenses checker"\non:\n push:\n paths:\n - "**/Cargo.lock"\n - "**/Cargo.toml"\n - "deny.toml"\n - ".github/workflows/cargo-deny.yml" # run when this file changes, so we know nothing is broken\n\njobs:\n check:\n runs-on: ubicloud-standard-8\n timeout-minutes: 10\n steps:\n - uses: actions/checkout@v4\n - uses: EmbarkStudios/cargo-deny-action@v2\n with:\n # The command to run with cargo-deny\n command: check licenses\n | dataset_sample\yaml\openobserve_openobserve\.github\workflows\cargo-deny.yml | cargo-deny.yml | YAML | 480 | 0.8 | 0 | 0.055556 | python-kit | 933 | 2024-06-11T02:54:04.221994 | Apache-2.0 | false | 1381865a3b485926785f4f836ff98512 |
name: initiate_enterprise_build\n\non:\n pull_request:\n branches:\n - "*"\nenv:\n GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}\n\njobs:\n initiate_enterprise_build:\n if: ${{ github.event.pull_request.head.repo.fork == false }} # Only run for PRs which are not from forks\n runs-on: ubuntu-latest\n permissions:\n pull-requests: write\n steps:\n - name: Generate token\n id: generate_token\n uses: actions/create-github-app-token@v2\n with:\n private-key: ${{ secrets.PRIVATE_KEY }}\n app-id: ${{ secrets.APP_ID }}\n # Set the owner, so the token can be used in all repositories\n owner: ${{ github.repository_owner }}\n - name: Set build short sha\n shell: bash\n run: |\n unset SHORT_COMMIT_ID\n echo "SHORT_COMMIT_ID=${GITHUB_HEAD_SHA:0:7}" >> $GITHUB_ENV\n\n - name: Confirm git commit SHA output\n run: echo ${{ env.SHORT_COMMIT_ID }}\n\n - name: Repository Dispatch\n uses: peter-evans/repository-dispatch@v3\n env:\n TOKEN: ${{ steps.generate_token.outputs.token }}\n BRANCH_NAME: ${{ github.head_ref || github.ref_name }}\n with:\n token: ${{ env.TOKEN }} # GitHub App installation access token\n repository: openobserve/o2-enterprise\n event-type: initiate-enterprise-build\n client-payload: '{"o2_enterprise_repo": "${{ env.BRANCH_NAME }}", "o2_opensource_repo": "${{ env.BRANCH_NAME }}" ,"o2_commit_id": "${{ env.SHORT_COMMIT_ID }}"}'\n | dataset_sample\yaml\openobserve_openobserve\.github\workflows\dispatch-event-enterprise.yml | dispatch-event-enterprise.yml | YAML | 1,538 | 0.8 | 0.046512 | 0.025641 | awesome-app | 590 | 2023-11-09T05:27:14.007929 | GPL-3.0 | false | e85b098cd4b6e152cc031f93466c7682 |
name: "JS Licenses checker"\n\non:\n push:\n branches:\n - "main"\n pull_request:\n branches:\n - "*"\n\njobs:\n js-license-check:\n runs-on: ubicloud-standard-8\n timeout-minutes: 10\n steps:\n - name: Checkout latest code\n uses: actions/checkout@v4\n - uses: actions/setup-node@v4\n with:\n node-version: 20\n - name: Build frontend code\n run: |\n results=$(git show --name-only HEAD | grep "package.*.json")\n if [ -z "$result" ]; then\n echo "No package.json or package-lock.json files changed. Skipping license check."\n exit 0\n fi\n cd web && npm install && npm run build\n - name: Check licenses\n run: |\n results=$(git show --name-only HEAD | grep "package.*.json")\n if [ -z "$result" ]; then\n echo "No package.json or package-lock.json files changed. Skipping license check."\n exit 0\n fi\n npm install -g license-checker\n cd web && npx -q --yes license-checker --production --json --onlyAllow="MIT;ISC;Apache-2.0;BSD;MPL-2.0;Unlicense;CC-BY-4.0;Artistic-2.0;UNLICENSED"\n env:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n GITHUB_CONTEXT: ${{ toJson(github) }} | dataset_sample\yaml\openobserve_openobserve\.github\workflows\js-license-checker.yml | js-license-checker.yml | YAML | 1,274 | 0.7 | 0.051282 | 0 | vue-tools | 250 | 2025-06-29T10:54:35.917003 | Apache-2.0 | false | e6379082ce00c119f894bfb24eba2567 |
name: "PR Title Checker"\non:\n pull_request_target:\n types: [opened, reopened, synchronize]\n\njobs:\n check:\n runs-on: ubuntu-latest\n timeout-minutes: 10\n steps:\n - uses: thehanimo/pr-title-checker@v1.4.3\n with:\n GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n pass_on_octokit_error: false\n configuration_path: ".github/pr-title-checker-config.json"\n | dataset_sample\yaml\openobserve_openobserve\.github\workflows\pr-title-checker.yml | pr-title-checker.yml | YAML | 395 | 0.7 | 0 | 0 | react-lib | 954 | 2024-12-10T11:30:30.787084 | GPL-3.0 | false | 48360e8fe36a879bf8ab620d7aac6f87 |
on:\n push:\n tags:\n - "v*.*.*"\nname: Release\nenv:\n RUST_TOOLCHAIN: nightly-2025-03-02\njobs:\n build:\n name: Build binary\n strategy:\n matrix:\n include:\n - arch: x86_64-unknown-linux-gnu\n os: ubuntu-2204-8-cores\n features: "--features mimalloc"\n file_name: openobserve-${{ github.ref_name }}-linux-amd64\n file_ext: .tar.gz\n - arch: x86_64-unknown-linux-gnu\n os: ubuntu-2204-8-cores\n features: "--features mimalloc"\n file_name: openobserve-${{ github.ref_name }}-linux-amd64-simd\n file_ext: .tar.gz\n - arch: x86_64-unknown-linux-musl\n os: ubuntu-2204-8-cores\n features: "--features mimalloc"\n file_name: openobserve-${{ github.ref_name }}-linux-amd64-musl\n file_ext: .tar.gz\n # - arch: aarch64-unknown-linux-musl\n # os: ubuntu-2204-8-cores\n # features: "--features mimalloc"\n # file_name: openobserve-${{ github.ref_name }}-linux-arm64-musl\n # file_ext: .tar.gz\n - arch: aarch64-unknown-linux-gnu\n os: ubuntu-2204-8-cores\n features: "--features mimalloc"\n file_name: openobserve-${{ github.ref_name }}-linux-arm64\n file_ext: .tar.gz\n - arch: x86_64-apple-darwin\n os: macos-latest\n features: "--features mimalloc"\n file_name: openobserve-${{ github.ref_name }}-darwin-amd64\n file_ext: .tar.gz\n - arch: aarch64-apple-darwin\n os: macos-latest\n features: "--features mimalloc"\n file_name: openobserve-${{ github.ref_name }}-darwin-arm64\n file_ext: .tar.gz\n - arch: x86_64-pc-windows-msvc\n os: windows-2022-16-cores\n features: ""\n file_name: openobserve-${{ github.ref_name }}-windows-amd64\n file_ext: .zip\n runs-on: ${{ matrix.os }}\n steps:\n - name: Checkout sources\n uses: actions/checkout@v4\n\n - name: Cache cargo assets\n id: cache\n uses: actions/cache@v4\n with:\n path: |\n ~/.cargo/bin/\n ~/.cargo/registry/index/\n ~/.cargo/registry/cache/\n ~/.cargo/git/db/\n target/\n key: ${{ matrix.arch }}-build-cargo-${{ hashFiles('**/Cargo.lock') }}\n\n - name: Install Node\n uses: actions/setup-node@v4\n with:\n node-version: 22.x\n cache: "npm"\n cache-dependency-path: web/package-lock.json\n - name: Build UI\n env:\n NODE_OPTIONS: "--max-old-space-size=8192"\n run: |\n cd web/\n npm install\n npm run build\n\n - name: Install Protoc for linux\n if: contains(matrix.arch, 'linux')\n run: | # Make sure the protoc is >= 3.15\n wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip\n unzip protoc-21.12-linux-x86_64.zip -d protoc\n sudo cp protoc/bin/protoc /usr/local/bin/\n sudo cp -r protoc/include/google /usr/local/include/\n\n - name: Install Protoc for windows\n if: contains(matrix.arch, 'windows')\n shell: bash\n run: |\n curl -L -o protoc-21.12-win64.zip https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win64.zip\n unzip protoc-21.12-win64.zip -d protoc\n cp protoc/bin/protoc.exe C:/windows/system32/protoc.exe\n cp -r protoc/include/google C:/windows/system32/\n\n - name: Install Protoc for macos\n if: contains(matrix.arch, 'darwin')\n run: |\n brew install protobuf\n\n - name: Install dependencies for linux\n if: contains(matrix.arch, 'linux-gnu')\n run: |\n sudo apt-get -y update\n sudo apt-get -y install libssl-dev pkg-config g++-aarch64-linux-gnu gcc-aarch64-linux-gnu\n\n - name: Install dependencies for linux\n if: contains(matrix.arch, 'linux-musl')\n run: |\n sudo apt-get -y update\n sudo apt-get -y install libssl-dev pkg-config g++-aarch64-linux-gnu gcc-aarch64-linux-gnu musl-dev musl-tools\n sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++"\n\n - name: Install rust toolchain\n uses: actions-rs/toolchain@v1\n with:\n toolchain: ${{ env.RUST_TOOLCHAIN }}\n target: ${{ matrix.arch }}\n override: true\n\n - name: Output package versions\n run: protoc --version ; cargo version ; rustc --version ; gcc --version ; g++ --version\n\n - name: Print rustc cfg\n run: rustc -C target-cpu=native --print cfg\n\n - name: Run cargo build\n if: contains(matrix.file_name, '-simd') == false\n run: cargo build ${{ matrix.features }} --profile release-prod --target ${{ matrix.arch }}\n\n - name: Run cargo build\n if: contains(matrix.file_name, '-simd')\n run: RUSTFLAGS='-C target-feature=+aes,+avx,+avx2,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+avx512f,+avx512cd,+avx512bw,+avx512dq,+avx512vl' cargo build ${{ matrix.features }} --profile release-prod --target ${{ matrix.arch }}\n\n - name: Calculate checksum and rename binary\n if: contains(matrix.arch, 'windows') == false\n shell: bash\n run: |\n cd target/${{ matrix.arch }}/release-prod\n chmod +x openobserve\n tar -zcvf ${{ matrix.file_name }}.tar.gz openobserve\n echo $(shasum -a 256 ${{ matrix.file_name }}.tar.gz | cut -f1 -d' ') > ${{ matrix.file_name }}.tar.gz.sha256sum\n\n - name: Calculate checksum and rename binary for windows\n if: contains(matrix.arch, 'windows')\n shell: bash\n run: |\n cd target/${{ matrix.arch }}/release-prod\n 7z a -tzip ${{ matrix.file_name }}.zip openobserve.exe\n certutil.exe -hashfile ${{ matrix.file_name }}.zip sha256|head -n 2|tail -n 1 > ${{ matrix.file_name }}.zip.sha256sum\n\n - name: Upload artifacts\n uses: actions/upload-artifact@v4\n with:\n name: ${{ matrix.file_name }}\n path: target/${{ matrix.arch }}/release-prod/${{ matrix.file_name }}${{ matrix.file_ext }}\n\n - name: Upload checksum of artifacts\n uses: actions/upload-artifact@v4\n with:\n name: ${{ matrix.file_name }}.sha256sum\n path: target/${{ matrix.arch }}/release-prod/${{ matrix.file_name }}${{ matrix.file_ext }}.sha256sum\n release:\n name: Release artifacts\n needs: [build]\n runs-on: ubuntu-latest\n steps:\n - name: Checkout sources\n uses: actions/checkout@v4\n\n - name: Download artifacts\n uses: actions/download-artifact@v4\n\n - name: Publish release\n uses: softprops/action-gh-release@v2\n with:\n name: "Release ${{ github.ref_name }}"\n generate_release_notes: true\n files: |\n **/openobserve-*\n | dataset_sample\yaml\openobserve_openobserve\.github\workflows\release.yml | release.yml | YAML | 6,953 | 0.8 | 0.080645 | 0.035714 | vue-tools | 732 | 2024-11-17T01:03:02.768414 | BSD-3-Clause | false | 178cbf0e3b324aa1c50d002c6178e23e |
name: Delete Spam Comments\n\non:\n issue_comment:\n types: [created, edited]\n\njobs:\n delete_mediafire_comments:\n runs-on: ubicloud-standard-8\n steps:\n - name: Check for Mediafire in comments\n uses: actions/github-script@v7\n with:\n private-key: ${{ secrets.PRIVATE_KEY }}\n # Set the owner, so the token can be used in all repositories\n owner: ${{ github.repository_owner }}\n script: |\n const commentBody = context.payload.comment.body.toLowerCase();\n const commentId = context.payload.comment.id;\n const issueNumber = context.payload.issue.number;\n\n if (commentBody.includes('mediafire')) {\n console.log(`Deleting comment #${commentId} on issue #${issueNumber}`);\n await github.rest.issues.deleteComment({\n owner: context.repo.owner,\n repo: context.repo.repo,\n comment_id: commentId\n });\n } else {\n console.log('No Mediafire link found, no action needed.');\n }\n | dataset_sample\yaml\openobserve_openobserve\.github\workflows\spam-cleaner.yml | spam-cleaner.yml | YAML | 1,086 | 0.8 | 0.064516 | 0.035714 | python-kit | 219 | 2023-12-07T09:05:47.536436 | MIT | false | ffcb701dc3d07f0f5671968f4beb66ba |
version: '3'\nservices:\n pyroscope:\n image: pyroscope/pyroscope:latest\n environment:\n - PYROSCOPE_LOG_LEVEL=debug\n ports:\n - '4040:4040'\n command:\n - 'server'\n | dataset_sample\yaml\openobserve_openobserve\benchmarks\pyroscope\docker-compose.yml | docker-compose.yml | YAML | 186 | 0.7 | 0 | 0 | awesome-app | 267 | 2024-04-09T21:38:25.330037 | MIT | false | 69c16c7f5e56f799e1433d242c355fd3 |
version: 0.2\n\nphases:\n pre_build:\n commands:\n - aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/zinclabs\n - docker login --username openobserve --password $DOCKER_HUB_ACCESS_TOKEN\n\n build:\n commands:\n # Increase swap file size\n - fallocate -l 32G /swapfile\n - chmod 600 /swapfile\n - mkswap /swapfile || true\n - swapon /swapfile || true\n - pwd\n - GIT_TAG="$(git describe --tags --abbrev=0)"\n - GIT_HASH="$(git rev-parse --short=7 HEAD)"\n - echo "Building for commit - $GIT_HASH"\n\n # install buildx\n - wget -nv https://github.com/docker/buildx/releases/download/v0.12.0/buildx-v0.12.0.linux-arm64\n - chmod +x buildx-v0.12.0.linux-arm64\n - mkdir -p ~/.docker/cli-plugins\n - mv buildx-v0.12.0.linux-arm64 ~/.docker/cli-plugins/docker-buildx\n - docker buildx install\n\n # build for sccache image\n # - docker build -t public.ecr.aws/zinclabs/rust:bookworm-sccache-arm64 -f deploy/build/Dockerfile.sccache.aarch64 .\n # - docker push public.ecr.aws/zinclabs/rust:bookworm-sccache-arm64\n # - echo 'Pull amd64 image'\n # - docker pull public.ecr.aws/zinclabs/rust:bookworm-sccache-amd64\n # - echo 'Create manifests'\n # - docker manifest create public.ecr.aws/zinclabs/rust:bookworm-sccache --amend public.ecr.aws/zinclabs/rust:bookworm-sccache-amd64 --amend public.ecr.aws/zinclabs/rust:bookworm-sccache-arm64\n # - echo 'Push manifests'\n # - docker manifest push public.ecr.aws/zinclabs/rust:bookworm-sccache\n\n # build openobserve\n - docker pull public.ecr.aws/zinclabs/rust:bookworm-sccache\n # - docker build -t openobserve:latest-arm64 -f deploy/build/Dockerfile.aarch64 .\n - docker build --build-arg AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION --build-arg AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI -t openobserve:latest-arm64 -f deploy/build/Dockerfile.aarch64 .\n - docker tag openobserve:latest-arm64 public.ecr.aws/zinclabs/openobserve-dev:latest-arm64\n - docker tag openobserve:latest-arm64 public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-arm64\n - docker push public.ecr.aws/zinclabs/openobserve-dev:latest-arm64\n - docker push public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-arm64\n\n - echo 'Pull amd64 image'\n - docker pull public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-amd64\n - docker pull public.ecr.aws/zinclabs/openobserve-dev:latest-amd64\n\n - echo 'Create manifests'\n - docker manifest create public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH --amend public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-amd64 --amend public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-arm64\n - docker manifest create public.ecr.aws/zinclabs/openobserve-dev:latest --amend public.ecr.aws/zinclabs/openobserve-dev:latest-amd64 --amend public.ecr.aws/zinclabs/openobserve-dev:latest-arm64\n\n - echo 'Push manifests'\n - docker manifest push public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH\n - docker manifest push public.ecr.aws/zinclabs/openobserve-dev:latest\n\ncache:\n paths:\n - /root/.cache/\n | dataset_sample\yaml\openobserve_openobserve\deploy\build\buildspec-arm.yml | buildspec-arm.yml | YAML | 3,267 | 0.8 | 0.032787 | 0.25 | python-kit | 519 | 2024-01-13T03:26:09.412094 | Apache-2.0 | false | c2a3e1f68481e71d2fefed22426bfd9f |
version: 0.2\n\nphases:\n pre_build:\n commands:\n - aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/zinclabs\n\n build:\n commands:\n # Increase swap file size\n - fallocate -l 32G /swapfile\n - chmod 600 /swapfile\n - mkswap /swapfile || true\n - swapon /swapfile || true\n - pwd\n - GIT_TAG="$(git describe --tags --abbrev=0)"\n - GIT_HASH="$(git rev-parse --short=7 HEAD)"\n - echo "Building for commit - $GIT_HASH"\n\n # install buildx\n - wget -nv https://github.com/docker/buildx/releases/download/v0.12.0/buildx-v0.12.0.linux-amd64\n - chmod +x buildx-v0.12.0.linux-amd64\n - mkdir -p ~/.docker/cli-plugins\n - mv buildx-v0.12.0.linux-amd64 ~/.docker/cli-plugins/docker-buildx\n - docker buildx install\n\n # build openobserve\n - docker pull public.ecr.aws/zinclabs/rust:bookworm-sccache\n - docker build --build-arg AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION --build-arg AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=$AWS_CONTAINER_CREDENTIALS_RELATIVE_URI -t openobserve:profiling-amd64 -f deploy/build/Dockerfile.profiling.amd64 .\n - docker tag openobserve:profiling-amd64 public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-profiling-amd64\n - docker push public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-profiling-amd64\n\ncache:\n paths:\n - /root/.cache/\n | dataset_sample\yaml\openobserve_openobserve\deploy\build\buildspec-profiling.yml | buildspec-profiling.yml | YAML | 1,428 | 0.8 | 0.028571 | 0.1 | python-kit | 276 | 2025-02-04T16:48:47.364887 | GPL-3.0 | false | ac73baa166524ecc1d2679ca22bc63b2 |
version: 0.2\n\nphases:\n pre_build:\n commands:\n - aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/zinclabs\n - docker login --username openobserve --password $DOCKER_HUB_ACCESS_TOKEN\n\n build:\n commands:\n # Increase swap file size\n - fallocate -l 32G /swapfile\n - chmod 600 /swapfile\n - mkswap /swapfile || true\n - swapon /swapfile || true\n - pwd\n - GIT_TAG="$(git describe --tags --abbrev=0)"\n\n # simd version\n - docker build -t openobserve:latest-amd64-simd -f deploy/build/Dockerfile.tag-simd.amd64 .\n - docker tag openobserve:latest-amd64-simd public.ecr.aws/zinclabs/openobserve:$GIT_TAG-amd64-simd\n - docker tag openobserve:latest-amd64-simd public.ecr.aws/zinclabs/openobserve:latest-amd64-simd\n \n - docker push public.ecr.aws/zinclabs/openobserve:$GIT_TAG-amd64-simd\n - docker push public.ecr.aws/zinclabs/openobserve:latest-amd64-simd\n\n # common version\n - docker build -t openobserve:latest-amd64 -f deploy/build/Dockerfile.tag.amd64 .\n - docker tag openobserve:latest-amd64 public.ecr.aws/zinclabs/openobserve:$GIT_TAG-amd64\n - docker tag openobserve:latest-amd64 public.ecr.aws/zinclabs/openobserve:latest-amd64\n \n - docker push public.ecr.aws/zinclabs/openobserve:$GIT_TAG-amd64\n - docker push public.ecr.aws/zinclabs/openobserve:latest-amd64\n\n # debug version\n - docker build -t openobserve:latest-amd64-debug -f deploy/build/Dockerfile.tag-debug.amd64 .\n - docker tag openobserve:latest-amd64-debug public.ecr.aws/zinclabs/openobserve:$GIT_TAG-amd64-debug\n - docker push public.ecr.aws/zinclabs/openobserve:$GIT_TAG-amd64-debug\n\n # create manifests for simd version\n - echo 'Pull arm64 image'\n - docker pull public.ecr.aws/zinclabs/openobserve:$GIT_TAG-arm64-simd\n - docker pull public.ecr.aws/zinclabs/openobserve:latest-arm64-simd\n \n - echo 'Create manifests'\n - docker manifest create public.ecr.aws/zinclabs/openobserve:$GIT_TAG-simd --amend public.ecr.aws/zinclabs/openobserve:$GIT_TAG-amd64-simd --amend public.ecr.aws/zinclabs/openobserve:$GIT_TAG-arm64-simd\n - docker manifest create public.ecr.aws/zinclabs/openobserve:latest-simd --amend public.ecr.aws/zinclabs/openobserve:latest-amd64-simd --amend public.ecr.aws/zinclabs/openobserve:latest-arm64-simd\n \n - echo 'Push manifests'\n - docker manifest push public.ecr.aws/zinclabs/openobserve:$GIT_TAG-simd\n - docker manifest push public.ecr.aws/zinclabs/openobserve:latest-simd\n\n # create manifests for common version\n - echo 'Pull arm64 image'\n - docker pull public.ecr.aws/zinclabs/openobserve:$GIT_TAG-arm64\n - docker pull public.ecr.aws/zinclabs/openobserve:latest-arm64\n \n - echo 'Create manifests'\n - docker manifest create public.ecr.aws/zinclabs/openobserve:$GIT_TAG --amend public.ecr.aws/zinclabs/openobserve:$GIT_TAG-amd64 --amend public.ecr.aws/zinclabs/openobserve:$GIT_TAG-arm64\n - docker manifest create public.ecr.aws/zinclabs/openobserve:latest --amend public.ecr.aws/zinclabs/openobserve:latest-amd64 --amend public.ecr.aws/zinclabs/openobserve:latest-arm64\n \n - echo 'Push manifests'\n - docker manifest push public.ecr.aws/zinclabs/openobserve:$GIT_TAG\n - docker manifest push public.ecr.aws/zinclabs/openobserve:latest\n\n # create manifests for debug version\n - echo 'Create debug manifests'\n - docker pull public.ecr.aws/zinclabs/openobserve:$GIT_TAG-arm64-debug\n - docker manifest create public.ecr.aws/zinclabs/openobserve:$GIT_TAG-debug --amend public.ecr.aws/zinclabs/openobserve:$GIT_TAG-amd64-debug --amend public.ecr.aws/zinclabs/openobserve:$GIT_TAG-arm64-debug\n - docker manifest push public.ecr.aws/zinclabs/openobserve:$GIT_TAG-debug\n\n # push to docker hub\n - echo 'Pull amd64 image'\n - docker tag openobserve:latest-amd64 openobserve/openobserve:$GIT_TAG-amd64\n - docker tag openobserve:latest-amd64 openobserve/openobserve:latest-amd64\n - docker push openobserve/openobserve:$GIT_TAG-amd64\n - docker push openobserve/openobserve:latest-amd64\n - echo 'Pull amd64-simd image'\n - docker tag openobserve:latest-amd64-simd openobserve/openobserve:$GIT_TAG-amd64-simd\n - docker tag openobserve:latest-amd64-simd openobserve/openobserve:latest-amd64-simd\n - docker push openobserve/openobserve:$GIT_TAG-amd64-simd\n - docker push openobserve/openobserve:latest-amd64-simd\n # create manifests for common version\n - echo 'Pull arm64 image'\n - docker pull openobserve/openobserve:$GIT_TAG-arm64\n - docker pull openobserve/openobserve:latest-arm64\n - echo 'Create manifests'\n - docker manifest create openobserve/openobserve:$GIT_TAG --amend openobserve/openobserve:$GIT_TAG-amd64 --amend openobserve/openobserve:$GIT_TAG-arm64\n - docker manifest create openobserve/openobserve:latest --amend openobserve/openobserve:latest-amd64 --amend openobserve/openobserve:latest-arm64\n - echo 'Push manifests'\n - docker manifest push openobserve/openobserve:$GIT_TAG\n - docker manifest push openobserve/openobserve:latest\n # create manifests for simd version\n - echo 'Pull arm64 image'\n - docker pull openobserve/openobserve:$GIT_TAG-arm64-simd\n - docker pull openobserve/openobserve:latest-arm64-simd\n - echo 'Create manifests'\n - docker manifest create openobserve/openobserve:$GIT_TAG-simd --amend openobserve/openobserve:$GIT_TAG-amd64-simd --amend openobserve/openobserve:$GIT_TAG-arm64-simd\n - docker manifest create openobserve/openobserve:latest-simd --amend openobserve/openobserve:latest-amd64-simd --amend openobserve/openobserve:latest-arm64-simd\n - echo 'Push manifests'\n - docker manifest push openobserve/openobserve:$GIT_TAG-simd\n - docker manifest push openobserve/openobserve:latest-simd \n # create manifests for debug version\n - docker tag openobserve:latest-amd64-debug openobserve/openobserve:$GIT_TAG-amd64-debug\n - docker push openobserve/openobserve:$GIT_TAG-amd64-debug\n - docker pull openobserve/openobserve:$GIT_TAG-arm64-debug\n - docker manifest create openobserve/openobserve:$GIT_TAG-debug --amend openobserve/openobserve:$GIT_TAG-amd64-debug --amend openobserve/openobserve:$GIT_TAG-arm64-debug\n - docker manifest push openobserve/openobserve:$GIT_TAG-debug\n | dataset_sample\yaml\openobserve_openobserve\deploy\build\buildspec-tag-amd64.yml | buildspec-tag-amd64.yml | YAML | 6,512 | 0.8 | 0.055556 | 0.11828 | node-utils | 429 | 2023-11-07T18:29:49.029131 | Apache-2.0 | false | c94dbbe993a78353c98fe5b2052a004b |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.