From 1039b97bebfa3a682e8d11ff7986926ed0948171 Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 10 Nov 2024 15:10:34 +0100 Subject: [PATCH] remove all other workflows (to be undone later) --- .github/workflows/build-binaries.yml | 80 ------------- .github/workflows/build-nix.yml | 31 ----- .github/workflows/build.yml | 164 --------------------------- .github/workflows/codespell.yml | 26 ----- .github/workflows/dependabot.yml | 25 ---- .github/workflows/docs.yml | 35 ------ .github/workflows/release.yml | 146 ------------------------ .github/workflows/scorecards.yml | 51 --------- 8 files changed, 558 deletions(-) delete mode 100644 .github/workflows/build-binaries.yml delete mode 100644 .github/workflows/build-nix.yml delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/codespell.yml delete mode 100644 .github/workflows/dependabot.yml delete mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/scorecards.yml diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml deleted file mode 100644 index 5c023a7c7a..0000000000 --- a/.github/workflows/build-binaries.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: binaries - -on: - push: - branches: - - main - -permissions: read-all - -jobs: - binaries: - strategy: - fail-fast: false - - matrix: - build: [linux-x86_64-musl, linux-x86_64-gnu, linux-aarch64-musl, linux-aarch64-gnu, macos-x86_64, macos-aarch64, win-x86_64] - include: - - build: linux-x86_64-musl - os: ubuntu-24.04 - target: x86_64-unknown-linux-musl - - build: linux-x86_64-gnu - os: ubuntu-24.04 - target: x86_64-unknown-linux-gnu - - build: linux-aarch64-musl - os: ubuntu-24.04 - target: aarch64-unknown-linux-musl - - build: linux-aarch64-gnu - os: ubuntu-24.04 - target: aarch64-unknown-linux-gnu - - build: macos-x86_64 - os: macos-13 - target: x86_64-apple-darwin - - build: macos-aarch64 - os: macos-14 - target: aarch64-apple-darwin - - build: win-x86_64 - os: windows-2022 - target: x86_64-pc-windows-msvc - runs-on: ${{ matrix.os }} - timeout-minutes: 15 # NOTE (aseipp): keep in-sync with the build.yml timeout limit - - name: Build binary artifacts - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: Install packages (Ubuntu) - if: matrix.os == 'ubuntu-24.04' - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools - - name: Install Rust - uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 - with: - toolchain: stable - target: ${{ matrix.target }} - - name: Build release binary - shell: bash - run: | - CARGO_CMD=cargo - if [[ "${{ matrix.target }}" = aarch64-unknown-linux* ]]; then - echo "Downloading 'cross' binary for aarch64-linux..." - wget -c https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz -O - | tar -xz - CARGO_CMD=$PWD/cross - fi - $CARGO_CMD build --target ${{ matrix.target }} --verbose --release --features packaging,vendored-openssl - - - name: Setup artifact directory - shell: bash - run: | - outdir="target/${{ matrix.target }}/release" - BIN=$outdir/jj - [[ "${{ matrix.os }}" == "windows-latest" ]] && BIN+=".exe" - - mkdir -p target/out - cp $BIN target/out - - - name: Publish binary artifact - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 - with: - name: jj-${{ matrix.target }} - path: target/out diff --git a/.github/workflows/build-nix.yml b/.github/workflows/build-nix.yml deleted file mode 100644 index 73f1fb4a84..0000000000 --- a/.github/workflows/build-nix.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: nix - -on: - push: - branches: - - main - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: read-all - -jobs: - nix: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-14] - runs-on: ${{ matrix.os }} - timeout-minutes: 15 # NOTE (aseipp): keep in-sync with the build.yml timeout limit - - name: flake check - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - with: - fetch-depth: 0 - - uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a - - uses: DeterminateSystems/magic-nix-cache-action@87b14cf437d03d37989d87f0fa5ce4f5dc1a330b - - run: nix flake check -L --show-trace diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 717960fdf5..0000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,164 +0,0 @@ -name: build - -on: - push: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: read-all - -env: - CARGO_INCREMENTAL: 0 - CARGO_PROFILE_DEV_DEBUG: 0 - -jobs: - build: - strategy: - fail-fast: false - matrix: - # macos-13 is x86; macos-14 is ARM - os: [ubuntu-latest, macos-13, macos-14, windows-latest] - cargo_flags: [""] - include: - - os: ubuntu-latest - cargo_flags: "--all-features" - runs-on: ${{ matrix.os }} - - # TODO FIXME (aseipp): keep the timeout limit to ~15 minutes. this is long - # enough to give us runway for the future, but also once we hit it, we're at - # the "builds are taking too long" stage and we should start looking at ways - # to optimize the CI. - # - # at the same time, this avoids some issues where some flaky, bugged tests - # seem to be causing multi-hour runs on Windows (GPG signing issues), which - # is a problem we should fix. in the mean time, this will make these flakes - # less harmful, as it won't cause builds to spin for multiple hours, requiring - # manual cancellation. - timeout-minutes: 15 - - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - # The default version of gpg installed on the runners is a version baked in with git - # which only contains the components needed by git and doesn't work for our test cases. - # - # This installs the latest gpg4win version, which is a variation of GnuPG built for - # Windows. - # - # There is some issue with windows PATH max length which is what all the PATH wrangling - # below is for. Please see the below link for where this fix was derived from: - # https://github.com/orgs/community/discussions/24933 - - name: Setup GnuPG [windows] - if: ${{ matrix.os == 'windows-latest' }} - run: | - $env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin" - [Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine") - choco install --yes gpg4win - echo "C:\Program Files (x86)\Gpg4win\..\GnuPG\bin" >> $env:GITHUB_PATH - - # The default version of openssh on windows server is quite old (8.1) and doesn't have - # all the necessary signing/verification commands available (such as -Y find-principals) - - name: Setup ssh-agent [windows] - if: ${{ matrix.os == 'windows-latest' }} - run: | - Remove-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 - Remove-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 - choco install openssh --pre - - - name: Install Rust - uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 - with: - toolchain: 1.76 - - name: Build - run: cargo build --workspace --all-targets --verbose ${{ matrix.cargo_flags }} - - name: Test - run: cargo test --workspace --all-targets --verbose ${{ matrix.cargo_flags }} - env: - RUST_BACKTRACE: 1 - - build-no-git: - name: Build jj-lib without Git support - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - - name: Install Rust - uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 - with: - toolchain: 1.76 - - name: Build - run: cargo build -p jj-lib --no-default-features --verbose - - check-protos: - name: Check protos - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 - with: - toolchain: stable - - run: sudo apt update && sudo apt-get -y install protobuf-compiler - - name: Generate Rust code from .proto files - run: cargo run -p gen-protos - - name: Check for uncommitted changes - run: git diff --exit-code - - rustfmt: - name: Check formatting - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 - with: - toolchain: nightly - components: rustfmt - - run: cargo +nightly fmt --all -- --check - - mkdocs: - name: Check that MkDocs can build the docs - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b - with: - python-version: 3.11 - - name: Install uv - uses: astral-sh/setup-uv@2e657c127d5b1635d5a8e3fa40e0ac50a5bf6992 - with: - version: "0.5.1" - - name: Check that `mkdocs` can build the docs - run: uv run -- mkdocs build --strict - - cargo-deny: - runs-on: ubuntu-latest - strategy: - matrix: - checks: - - advisories - - bans licenses sources - - # Prevent sudden announcement of a new advisory from failing ci: - continue-on-error: ${{ matrix.checks == 'advisories' }} - - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: EmbarkStudios/cargo-deny-action@8371184bd11e21dcf8ac82ebf8c9c9f74ebf7268 - with: - command: check ${{ matrix.checks }} - - clippy-check: - name: Clippy check - permissions: - checks: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 - with: - toolchain: stable - components: clippy - - run: cargo +stable clippy --all-features --workspace --all-targets -- -D warnings diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 37870813be..0000000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Codespell - -on: - push: - branches: - - main - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: read-all - -jobs: - codespell: - name: Codespell - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 - with: - check_filenames: true - check_hidden: true - skip: ./target,./.jj,*.lock - ignore_words_list: crate,NotIn,Wirth diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml deleted file mode 100644 index 7b935d2e98..0000000000 --- a/.github/workflows/dependabot.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Enable auto-merge for Dependabot PRs - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -permissions: read-all - -jobs: - dependabot-auto-merge: - name: 'Dependabot auto-merge' - permissions: - contents: write - pull-requests: write - runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' }} - steps: - - name: Enable auto-merge for Dependabot PRs - run: gh pr merge --auto --rebase "$PR_URL" - env: - PR_URL: ${{github.event.pull_request.html_url}} - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 9e63727e32..0000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: website - -on: - push: - branches: - - main - -permissions: - contents: write - -jobs: - prerelease-docs-build-deploy: - if: github.repository_owner == 'martinvonz' # Stops this job from running on forks - strategy: - matrix: - os: [ubuntu-latest] - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - run: "git fetch origin gh-pages --depth=1" - - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b - with: - python-version: 3.11 - - name: Install uv - uses: astral-sh/setup-uv@2e657c127d5b1635d5a8e3fa40e0ac50a5bf6992 - with: - version: "0.5.1" - - name: Install dependencies, compile and deploy docs - run: | - git config user.name 'jj-docs[bot]' - git config user.email 'jj-docs[bot]@users.noreply.github.io' - .github/scripts/docs-build-deploy 'https://martinvonz.github.io/jj' prerelease --push - - name: "Show `git diff --stat`" - run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 2fdf1ba00e..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: Release - -on: - release: - types: [published] - -permissions: read-all - -env: - CARGO_INCREMENTAL: 0 - -jobs: - build-release: - name: build-release - permissions: - contents: write - strategy: - fail-fast: false - matrix: - build: [linux-x86_64-musl, linux-aarch64-musl, macos-x86_64, macos-aarch64, win-msvc] - include: - - build: linux-x86_64-musl - os: ubuntu-24.04 - target: x86_64-unknown-linux-musl - - build: linux-aarch64-musl - os: ubuntu-24.04 - target: aarch64-unknown-linux-musl - - build: macos-x86_64 - os: macos-13 - target: x86_64-apple-darwin - - build: macos-aarch64 - os: macos-14 - target: aarch64-apple-darwin - - build: win-msvc - os: windows-2022 - target: x86_64-pc-windows-msvc - runs-on: ${{ matrix.os }} - steps: - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: Install packages (Ubuntu) - if: matrix.os == 'ubuntu-24.04' - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools - - name: Install Rust - uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 - with: - toolchain: stable - target: ${{ matrix.target }} - - name: Download cross-compilation tool (linux-aarch64) - if: matrix.target == 'aarch64-unknown-linux-musl' - run: wget -c https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz -O - | tar -xz - - name: Build release binary - shell: bash - run: | - CARGO_CMD=cargo - if [ "${{ matrix.target }}" = "aarch64-unknown-linux-musl" ]; then - CARGO_CMD=$PWD/cross - fi - $CARGO_CMD build --target ${{ matrix.target }} --verbose --release --features packaging,vendored-openssl - - name: Build archive - shell: bash - run: | - outdir="target/${{ matrix.target }}/release" - staging="jj-${{ github.event.release.tag_name }}-${{ matrix.target }}" - mkdir "$staging" - cp {README.md,LICENSE} "$staging/" - if [ "${{ matrix.os }}" = "windows-2022" ]; then - cp "$outdir/jj.exe" "$staging/" - cd "$staging" - 7z a "../$staging.zip" . - echo "ASSET=$staging.zip" >> $GITHUB_ENV - else - cp "$outdir/jj" "$staging/" - tar czf "$staging.tar.gz" -C "$staging" . - echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV - fi - - name: Upload release archive - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ${{ env.ASSET }} - asset_name: ${{ env.ASSET }} - asset_content_type: application/octet-stream - - docs-release-archive: - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - name: Install packages (Ubuntu) - run: | - sudo apt-get update - sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b - with: - python-version: 3.11 - - name: Install uv - uses: astral-sh/setup-uv@2e657c127d5b1635d5a8e3fa40e0ac50a5bf6992 - with: - version: "0.5.1" - - name: Compile docs and zip them up - run: | - uv run -- mkdocs build -f mkdocs-offline.yml - archive="jj-${{ github.event.release.tag_name }}-docs-html.tar.gz" - tar czf "$archive" -C "rendered-docs" . - echo "ASSET=$archive" >> $GITHUB_ENV - - name: Upload release archive - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ${{ env.ASSET }} - asset_name: ${{ env.ASSET }} - asset_content_type: application/octet-stream - - docs-deploy-website-latest-release: - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - run: "git fetch origin gh-pages --depth=1" - - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b - with: - python-version: 3.11 - - name: Install uv - uses: astral-sh/setup-uv@2e657c127d5b1635d5a8e3fa40e0ac50a5bf6992 - with: - version: "0.5.1" - - name: Install dependencies, compile and deploy docs to the "latest release" section of the website - run: | - git config user.name 'jj-docs[bot]' - git config user.email 'jj-docs[bot]@users.noreply.github.io' - # Using the 'latest' tag below makes the website default - # to this version. - .github/scripts/docs-build-deploy 'https://martinvonz.github.io/jj' "${{ github.event.release.tag_name }}" latest --update-aliases --push - - name: "Show `git diff --stat`" - run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)" diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml deleted file mode 100644 index 2a466d8951..0000000000 --- a/.github/workflows/scorecards.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Scorecards supply-chain security -on: - # Only the default branch is supported. - branch_protection_rule: - schedule: - - cron: '17 3 * * 1' - push: - branches: [ main ] - -# Declare default permissions as read only. -permissions: read-all - -jobs: - analysis: - name: Scorecards analysis - runs-on: ubuntu-latest - permissions: - # Needed to upload the results to code-scanning dashboard. - security-events: write - id-token: write - - steps: - - name: "Checkout code" - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - with: - persist-credentials: false - - - name: "Run analysis" - uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 - with: - results_file: results.sarif - results_format: sarif - # Publish the results to enable scorecard badges. For more details, see - # https://github.com/ossf/scorecard-action#publishing-results. - # For private repositories, `publish_results` will automatically be set to `false`, - # regardless of the value entered here. - publish_results: true - - # Upload the results as artifacts (optional). - - name: "Upload artifact" - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 - with: - name: SARIF file - path: results.sarif - retention-days: 5 - - # Upload the results to GitHub's code scanning dashboard. - - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd - with: - sarif_file: results.sarif