-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+69 - nice, start working on actual pretest
- Loading branch information
Showing
1 changed file
with
27 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,7 +122,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
exec_data: ${{ fromJson(needs.enmr-PRs.outputs.exec_list) }} | ||
exec-data: ${{ fromJson(needs.enmr-PRs.outputs.exec_list) }} | ||
|
||
steps: | ||
- name: git config | ||
|
@@ -133,26 +133,36 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git config --global --add url.https://github.com/.insteadOf "[email protected]:" | ||
- name: checkout | ||
- name: checkout main repo | ||
uses: actions/checkout@main | ||
with: | ||
path: './core' | ||
fetch-depth: 0 | ||
|
||
# - name: checkout subm fork | ||
# uses: actions/checkout@main | ||
# with: | ||
# repository: 'SunSerega/OpenCL-Docs' | ||
# ref: 'pretest/${{ matrix.exec_data.pr_num }}' | ||
# path: './fork' | ||
# token: ${{ secrets.POCGL_pretest_upstream_PAT }} | ||
- name: checkout subm fork | ||
uses: actions/checkout@main | ||
with: | ||
repository: ${{ matrix.exec-data.fork_repo }} | ||
ref: 'pretest/${{ matrix.exec-data.pr_num }}' | ||
path: './fork' | ||
fetch-depth: 0 | ||
token: ${{ secrets.POCGL_pretest_upstream_PAT }} | ||
|
||
- name: pretest | ||
run: | | ||
$subm_url = "${{ matrix.exec_data.subm_url }}" | ||
$pr_num = "${{ matrix.exec_data.pr_num }}" | ||
$subm_url = "${{ matrix.exec-data.subm_url }}" | ||
$pr_num = "${{ matrix.exec-data.pr_num }}" | ||
Write-Host "Testing PR $pr_num from: $subm_url" | ||
# aaaaa | ||
Push-Location './core' | ||
git fetch | ||
Pop-Location | ||
Push-Location './fork' | ||
git fetch | ||
Pop-Location | ||
remove-old-pretest: | ||
runs-on: windows-latest | ||
|
@@ -182,11 +192,6 @@ jobs: | |
- name: remove old pretest branches | ||
run: | | ||
# git config --unset remote.origin.url | ||
# git config --unset remote.origin.fetch | ||
function Split-OrEmpty { | ||
param ( $s ) | ||
if (-not $s) { return @() } | ||
|
@@ -204,9 +209,9 @@ jobs: | |
New-Item -ItemType Directory -Path $main_repo_dir | Out-Null | ||
Push-Location $main_repo_dir | ||
$main_repo_url = '${{ github.server_url }}/${{ github.repository }}' | ||
Write-Host "fetching commits of: $main_repo_url" | ||
Write-Host "Cloning main repo: $main_repo_url" | ||
git clone --filter=tree:0 --no-progress --no-checkout $main_repo_url . | ||
git branch -r | ||
# git branch -r | ||
$core_removed_pr_nums = @() | ||
foreach ($pr_num in $core_pretest_pr_nums) { | ||
|
@@ -223,7 +228,7 @@ jobs: | |
} | ||
if ($is_trivial) { | ||
Write-Host "Is trivial, removing..." | ||
# git push origin --delete $branch_name | ||
git push origin --delete $branch_name # BRANCH DELETE | ||
$core_removed_pr_nums += $pr_num | ||
} | ||
Write-Host '~~~~~' | ||
|
@@ -237,12 +242,12 @@ jobs: | |
foreach ($pr_num in $subm_pretest_pr_nums) { | ||
Write-Host "PR $pr_num was orphaned" | ||
Write-Host "PR $pr_num was closed" | ||
if ($core_pretest_pr_nums -contains $pr_num) { | ||
Write-Host "But main repo is still referencing it" | ||
} else { | ||
Write-Host "Removing..." | ||
# git push origin --delete "pretest/$pr_num" | ||
git push origin --delete "pretest/$pr_num" # BRANCH DELETE | ||
} | ||
Write-Host '~~~~~' | ||
} | ||
|