Skip to content

Commit

Permalink
Move CI-related scripts to its own folder (#2561)
Browse files Browse the repository at this point in the history
### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested https://demo.rerun.io/pr/2561 (if applicable)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2561

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/060b813/docs
Examples preview: https://rerun.io/preview/060b813/examples
<!-- pr-link-docs:end -->
  • Loading branch information
emilk committed Jun 29, 2023
1 parent c37154d commit 66f5a87
Show file tree
Hide file tree
Showing 34 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checkboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Check PR checkboxes
run: |
./scripts/check_pr_checkboxes.py \
./scripts/ci/check_pr_checkboxes.py \
--github-token ${{ secrets.GITHUB_TOKEN }} \
--github-repository ${{ github.repository }} \
--pr-number ${{ github.event.pull_request.number }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manual_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Verify wheels match the expected release
run: |
python3 scripts/verify_wheels.py --folder wheels --version ${{ inputs.RELEASE_VERSION }}
python3 scripts/ci/verify_wheels.py --folder wheels --version ${{ inputs.RELEASE_VERSION }}
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
Expand All @@ -91,7 +91,7 @@ jobs:
generateReleaseNotes: true
allowUpdates: true
draft: true

- name: Release Web Demo
run: |
gsutil -m cp -r "gs://rerun-demo/commit/${{ env.SHORT_SHA }}/*" "gs://rerun-demo/version/latest/"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_build_and_test_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ jobs:
# After patching the pre-release version, run cargo update.
# This updates the cargo.lock file with the new version numbers and keeps the wheel build from failing
run: |
python3 scripts/version_util.py --patch_prerelease
python3 scripts/ci/version_util.py --patch_prerelease
cargo update -w
- name: Store the expected version
# Find the current cargo version and store it in the output: `expected_version`
shell: bash
id: expected_version
run: |
echo "EXPECTED_VERSION=$(python3 scripts/version_util.py --bare_cargo_version)" >> "$GITHUB_OUTPUT"
echo "EXPECTED_VERSION=$(python3 scripts/ci/version_util.py --bare_cargo_version)" >> "$GITHUB_OUTPUT"
- name: Check the expected version
if: ${{ inputs.RELEASE_VERSION != 'prerelease' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ jobs:
# After patching the pre-release version, run cargo update.
# This updates the cargo.lock file with the new version numbers and keeps the wheel build from failing
run: |
python3 scripts/version_util.py --patch_prerelease
python3 scripts/ci/version_util.py --patch_prerelease
cargo update -w
- name: Store the expected version
# Find the current cargo version and store it in the output: `expected_version`
shell: bash
id: expected_version
run: |
echo "EXPECTED_VERSION=$(python3 scripts/version_util.py --bare_cargo_version)" >> "$GITHUB_OUTPUT"
echo "EXPECTED_VERSION=$(python3 scripts/ci/version_util.py --bare_cargo_version)" >> "$GITHUB_OUTPUT"
- name: Check the expected version
if: ${{ inputs.RELEASE_VERSION != 'prerelease' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_build_web_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
env:
COMMIT_HASH: ${{ env.SHORT_SHA }}
run: |
python3 scripts/build_demo_app.py --skip-build
python3 scripts/ci/build_demo_app.py --skip-build
- name: Upload web demo assets
uses: actions/upload-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/reusable_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ jobs:
- name: Check for too large files
run: |
./scripts/check_large_files.sh
./scripts/ci/check_large_files.sh
- name: Check Python example requirements
run: |
./scripts/check_requirements.py
./scripts/ci/check_requirements.py
# ---------------------------------------------------------------------------

Expand Down Expand Up @@ -324,5 +324,5 @@ jobs:
- name: Cargo Deny
shell: bash
id: expected_version
run: ./scripts/cargo_deny.sh
run: ./scripts/ci/cargo_deny.sh

2 changes: 1 addition & 1 deletion .github/workflows/reusable_pip_index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- name: Render pip index and upload to gcloud
run: |
python scripts/generate_prerelease_pip_index.py \
python scripts/ci/generate_prerelease_pip_index.py \
--commit ${{ github.sha }} \
--upload
2 changes: 1 addition & 1 deletion .github/workflows/reusable_pr_summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

- name: Render HTML template
run: |
python scripts/generate_pr_summary.py \
python scripts/ci/generate_pr_summary.py \
--github-token ${{secrets.GITHUB_TOKEN}} \
--github-repository ${GITHUB_REPOSITORY} \
--pr-number ${{ inputs.PR_NUMBER }} \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable_update_pr_body.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

- name: Update PR description
run: |
./scripts/update_pr_body.py \
./scripts/ci/update_pr_body.py \
--github-token '${{ secrets.GITHUB_TOKEN }}' \
--github-repository '${{ github.repository }}' \
--pr-number '${{ inputs.PR_NUMBER }}'
Expand Down
2 changes: 1 addition & 1 deletion crates/re_build_info/src/crate_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const IS_PRERELEASE_BIT: u8 = 1 << 6;
/// We use `-alpha.X` when we publish pre-releases to crates.io and PyPI.
///
/// We use a `+githash` suffix for continuous pre-releases that you can download from our GitHub.
/// We do NOT store that in this struct. See also `scripts/version_util.py`.
/// We do NOT store that in this struct. See also `scripts/ci/version_util.py`.
///
/// The version numbers aren't allowed to be very large (current max: 31).
/// This limited subset it chosen so that we can encode the version in 32 bits
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/cargo_deny.sh → scripts/ci/cargo_deny.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/.."
cd "$script_path/../.."
set -x

# cargo install cargo-deny
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Check for files that are too large to be checked into the repository.
# Whenever we want to make an exception, we add it to `check_large_files_allow_list.txt`
set -eu
script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
cd "$script_path/../.."

# Maximum file size, unless found in `check_large_files_allow_list.txt`
maximum_size=$((100 * 1024))
Expand All @@ -11,7 +13,7 @@ while read -d '' -r file; do
if [[ -f "$file" ]]; then
actualsize=$(wc -c <"$file")
if [ $actualsize -ge $maximum_size ]; then
if ! grep -qx "$file" ./scripts/check_large_files_allow_list.txt; then
if ! grep -qx "$file" ./scripts/ci/check_large_files_allow_list.txt; then
echo "$file is $actualsize byte (max allowed is $maximum_size bytes)"
result=1
fi
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/version_util.py → scripts/ci/version_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
create a prerelease version for continuous releases.
--bare_cargo_version Outputs the bare cargo version. This is helpful for setting an environment variable, such as:
EXPECTED_VERSION=$(python3 scripts/version_util.py --bare_cargo_version)
EXPECTED_VERSION=$(python3 scripts/ci/version_util.py --bare_cargo_version)
"""
from __future__ import annotations

Expand Down
2 changes: 1 addition & 1 deletion scripts/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

cryptography==38.0.4 # for scripts/upload_image.py
google-cloud-storage==2.9.0 # for scripts/upload_image.py
PyGithub==1.58.2 # for scripts/generate_pr_summary.py and scripts/update_pr_body.py
PyGithub==1.58.2 # for scripts/ci/generate_pr_summary.py and scripts/ci/update_pr_body.py
Pillow # for scripts/upload_image.py
tqdm
requests

0 comments on commit 66f5a87

Please sign in to comment.