Skip to content

Commit

Permalink
Merge branch 'trunk' into sm_mixed_output
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner authored Feb 6, 2024
2 parents 154185c + 3187765 commit 23f20ec
Show file tree
Hide file tree
Showing 139 changed files with 2,740 additions and 1,019 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ on:
required: false
type: string
default: ''
artifact-name:
description: Name of artifact to upload
required: false
type: string
default: 'ignore-artifacts'

jobs:
bazel:
Expand Down Expand Up @@ -140,3 +145,14 @@ jobs:
title: "Nightly"
prerelease: true
files: ${{ inputs.nightly-release-files }}
- name: Save changes
if: ${{ always() && inputs.artifact-name != 'ignore-artifacts' }}
run: |
git diff > changes.patch
- name: "Upload changes"
if: ${{ always() && inputs.artifact-name != 'ignore-artifacts' }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact-name }}
path: changes.patch
retention-days: 6
2 changes: 1 addition & 1 deletion .github/workflows/ci-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
os: windows
- ruby-version: 3.0.6
os: macos
- ruby-version: 3.2.2
- ruby-version: 3.3.0
os: ubuntu
- ruby-version: jruby-9.4.5.0
os: ubuntu
Expand Down
37 changes: 29 additions & 8 deletions .github/workflows/ci-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: CI - Rust

on:
workflow_call:
inputs:
release:
required: false
type: string
default: false
branch:
required: false
type: string
default: trunk
secrets:
SELENIUM_CI_TOKEN:
required: true
Expand Down Expand Up @@ -43,6 +52,8 @@ jobs:
steps:
- name: "Checkout project"
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: "Update Rust"
run: |
rustup update
Expand All @@ -55,7 +66,7 @@ jobs:
- name: "Rename binary"
run: mv rust/target/release/selenium-manager.exe selenium-manager-windows.exe
- name: "Upload release binary"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: selenium-manager-windows
path: selenium-manager-windows.exe
Expand All @@ -71,6 +82,8 @@ jobs:
steps:
- name: "Checkout project"
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: "Update Rust"
run: |
rustup update
Expand All @@ -83,7 +96,7 @@ jobs:
- name: "Rename binary"
run: mv rust/target/debug/selenium-manager.exe selenium-manager-windows-debug.exe
- name: "Upload release binary"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: selenium-manager-windows-debug
path: selenium-manager-windows-debug.exe
Expand All @@ -97,6 +110,8 @@ jobs:
steps:
- name: "Checkout project"
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: "Update Rust"
run: |
rustup update
Expand All @@ -111,7 +126,7 @@ jobs:
- name: "Rename binary"
run: mv rust/target/x86_64-unknown-linux-musl/release/selenium-manager selenium-manager-linux
- name: "Upload release binary"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: selenium-manager-linux
path: selenium-manager-linux
Expand All @@ -125,6 +140,8 @@ jobs:
steps:
- name: "Checkout project"
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: "Update Rust"
run: |
rustup update
Expand All @@ -140,7 +157,7 @@ jobs:
tar -cvf ../../../../selenium-manager-linux-debug.tar selenium-manager
working-directory: rust
- name: "Upload release binary"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: selenium-manager-linux-debug
path: selenium-manager-linux-debug.tar
Expand All @@ -156,6 +173,8 @@ jobs:
steps:
- name: "Checkout project"
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: "Update Rust"
run: |
rustup update
Expand All @@ -170,7 +189,7 @@ jobs:
target/x86_64-apple-darwin/release/selenium-manager
working-directory: rust
- name: "Upload release binary"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: selenium-manager-macos
path: rust/target/selenium-manager-macos
Expand All @@ -186,6 +205,8 @@ jobs:
steps:
- name: "Checkout project"
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: "Update Rust"
run: |
rustup update
Expand All @@ -202,7 +223,7 @@ jobs:
tar -cvf ../../selenium-manager-macos-debug.tar selenium-manager
working-directory: rust
- name: "Upload release binary"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: selenium-manager-macos-debug
path: selenium-manager-macos-debug.tar
Expand All @@ -212,15 +233,15 @@ jobs:
name: "Release Binaries"
runs-on: ubuntu-latest
needs: [macos-stable, linux-stable, windows-stable, macos-debug, linux-debug, windows-debug]
if: github.event_name != 'schedule' && github.repository_owner == 'seleniumhq' && github.ref == 'refs/heads/trunk'
if: github.event_name != 'schedule' && github.repository_owner == 'seleniumhq' && (github.ref == 'refs/heads/trunk' || inputs.release == 'true')
steps:
- name: "Checkout selenium_manager_artifacts"
uses: actions/checkout@v4
with:
token: ${{ secrets.SELENIUM_CI_TOKEN }}
repository: SeleniumHQ/selenium_manager_artifacts
- name: "Download Artifacts"
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
path: artifacts
- name: "Prepare and Commit"
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ on:
- cron: "0 */12 * * *"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}${{ github.event_name == 'workflow_dispatch' && '-all' || '' }}${{ github.event_name == 'schedule' && '-all' || '' }}
cancel-in-progress: true

jobs:
check:
name: Check
Expand Down Expand Up @@ -40,7 +36,7 @@ jobs:
id: check-targets
run: ./scripts/github-actions/check-bazel-targets.sh
env:
COMMIT_RANGE: ${{ github.event.pull_request.base.sha || github.event.before }}..${{ github.event.pull_request.head.sha || github.sha }}
COMMIT_RANGE: ${{ github.event.pull_request.base.sha || github.event.before }}...${{ github.event.pull_request.head.sha || github.sha }}

dotnet:
name: .NET
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/pin-browsers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Pin Browsers
on:
schedule:
- cron: 10 0 * * *
workflow_dispatch:

jobs:
update:
name: Update Pinned Browsers
uses: ./.github/workflows/bazel.yml
with:
name: Pin Browsers
cache-key: pin-browsers
run: bazel run //scripts:pinned_browsers
artifact-name: pinned-browsers

pull-request:
if: github.repository_owner == 'seleniumhq'
runs-on: ubuntu-latest
needs: update
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download patch
uses: actions/download-artifact@v4
with:
name: pinned-browsers
- name: Apply Patch
run: |
git apply changes.patch
rm changes.patch
- name: Check Changes
run: |
if [[ -n $(git status --porcelain common/repositories.bzl) ]]; then
echo "CHANGES_FOUND=true" >> $GITHUB_ENV
fi
- name: Create Pull Request
if: env.CHANGES_FOUND == 'true'
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.SELENIUM_CI_TOKEN }}
add-paths: common/repositories.bzl
commit-message: "Update pinned browser versions"
committer: Selenium CI Bot <[email protected]>
author: Selenium CI Bot <[email protected]>
title: "[dotnet][rb][java][js][py] Automated Browser Version Update"
body: |
This is an automated pull request to update pinned browsers and drivers
Merge after verify the new browser versions properly passing the tests and no bugs need to be filed
branch: "pinned-browser-updates"
110 changes: 110 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Release Preparation

on:
workflow_dispatch:
inputs:
version:
description: 'Selenium version to release'
required: true
chrome_channel:
description: 'Chrome Channel for CDP'
required: true
type: choice
default: "stable"
options:
- stable
- early-stable

jobs:
update-rust:
name: Update Rust Version
runs-on: ubuntu-latest
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true
- name: "Prep git"
run: |
git config --local user.email "[email protected]"
git config --local user.name "Selenium CI Bot"
if git rev-parse --verify release-${{ github.event.inputs.version }} >/dev/null 2>&1; then
git branch -D release-${{ github.event.inputs.version }}
fi
git checkout -b release-${{ github.event.inputs.version }}
- name: Update Rust Version
run: |
./go rust:version
./go rust:version:commit
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.SELENIUM_CI_TOKEN }}
branch: release-${{ github.event.inputs.version }}
force: true

selenium-manager:
name: Release Selenium Manager
needs: update-rust
uses: ./.github/workflows/ci-rust.yml
with:
release: true
branch: release-${{ github.event.inputs.version }}
secrets:
SELENIUM_CI_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}

update-files:
name: Update Files
runs-on: ubuntu-latest
needs: selenium-manager
steps:
- name: "Checkout project"
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
fetch-tags: true
ref: release-${{ github.event.inputs.version }}
- name: Install Ruby
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
ruby-version: '3.1'
- name: "Prep git"
run: |
git config --local user.email "[email protected]"
git config --local user.name "Selenium CI Bot"
- name: Undo rust changelog commit
run: git reset HEAD~1
- name: Update everything including early release CDP
if: ${{ github.event.inputs.chrome_channel == 'early-stable' }}
run: ./go all:prepare['Beta']
- name: Update everything including released CDP
if: ${{ github.event.inputs.chrome_channel == 'stable' }}
run: ./go all:prepare
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.SELENIUM_CI_TOKEN }}
author: Selenium CI Bot <[email protected]>
delete-branch: true
title: "[build] Prepare for release of Selenium ${{ github.event.inputs.version }}"
body: |
**Warning: Manually update the changelogs before merging**
This PR:
* Updates Rust version for Selenium Manager release
* Updates Pinned browser version to coincide with new CDP release
* Adds support for new CDP version and removes old CDP version
* Selenium Manager references the new Selenium Manager release
* Updates Maven Dependencies
* Adds new authors to authors file
* Updates all versions for all bindings
* Generates *rough* change logs for each bindings (please tidy them up before merging this)
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: C-build
draft: true
Loading

0 comments on commit 23f20ec

Please sign in to comment.