Skip to content

Commit

Permalink
Merge branch 'main' into fixes_#1302
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Morin <jean_christophe_morin@hotmail.com>
  • Loading branch information
JeanChristopheMorinPerso committed Jan 27, 2024
2 parents 3ff62e9 + 6bdba31 commit 25665f5
Show file tree
Hide file tree
Showing 217 changed files with 4,991 additions and 11,228 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup-python/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runs:
steps:
- name: Set up Python ${{ inputs.python-version }} with actions/setup-python
if: ${{ inputs.python-version != '2.7' }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

Expand Down
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Set update schedule for GitHub Actions
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"

# https://github.com/dependabot/dependabot-core/issues/6704
- package-ecosystem: "github-actions"
directory: "/.github/actions/setup-python"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"

- package-ecosystem: "pip"
directory: "/docs"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
34 changes: 0 additions & 34 deletions .github/docker/rez-win-base/Dockerfile

This file was deleted.

65 changes: 0 additions & 65 deletions .github/docker/rez-win-py/Dockerfile

This file was deleted.

55 changes: 0 additions & 55 deletions .github/docker/rez-win-py/entrypoint.ps1

This file was deleted.

3 changes: 2 additions & 1 deletion .github/scripts/store_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def store_result():
destdir = '-'.join((
time.strftime("%Y.%m.%d"),
"%d.%d" % sys.version_info[:2],
_rez_version
# TODO: We could read the version from summary.json...
_rez_version,
))

destpath = os.path.join(artifacts_dir, destdir)
Expand Down
93 changes: 47 additions & 46 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,24 @@ name: benchmark
on:
release:
types: [released]
pull_request:
types: [opened, synchronize, reopened, labeled]

jobs:
run_benchmark:
name: run_benchmark
runs-on: ubuntu-latest

if: ${{ github.event_name == 'release' || contains(github.event.pull_request.labels.*.name, 'run-benchmarks') }}

strategy:
matrix:
python-version:
- '2.7'
- '3.7'

# without this, we're sometimes getting at the end of this job:
# '[error] The operation was canceled'.
# Do we hit a resource limit?
#
max-parallel: 1

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup python ${{ matrix.python-version }}
uses: ./.github/actions/setup-python
Expand All @@ -37,11 +34,6 @@ jobs:
run: |
mkdir ./installdir
if [[ "${{ matrix.python-version }}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
python ./install.py ./installdir
- name: Run Benchmark
Expand All @@ -53,13 +45,9 @@ jobs:
- name: Validate Result
run: |
if [[ "${{ matrix.python-version }}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
python ./.github/scripts/validate_benchmark.py
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: "benchmark-result-${{ matrix.python-version }}"
path: ./out
Expand All @@ -72,26 +60,20 @@ jobs:
strategy:
matrix:
python-version:
- '2.7'
- '3.7'

# so we don't have jobs trying to push to git at the same time
max-parallel: 1

steps:
- name: Setup python ${{ matrix.python-version }}
uses: ./.github/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
os: ubuntu

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: "benchmark-result-${{ matrix.python-version }}"
path: .

- name: Checkout
uses: actions/checkout@v3
- name: Checkout (release)
uses: actions/checkout@v4
if: ${{ github.event_name =='release' }}
with:
ref: main
path: src
Expand All @@ -100,7 +82,20 @@ jobs:
# protected branch (main) from this workflow.
# See https://github.community/t/how-to-push-to-protected-branches-in-a-github-action/16101/14
#
token: "${{ secrets.GH_ACTION_TOKEN }}"
# Disable for now until we find a better solution.
# token: "${{ secrets.GH_ACTION_TOKEN }}"

- name: Checkout (pr)
uses: actions/checkout@v4
if: ${{ github.event_name !='release' }}
with:
path: src

- name: Setup python ${{ matrix.python-version }}
uses: ./src/.github/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
os: ubuntu-latest

# Note failing due to
# https://github.com/actions/virtual-environments/issues/675
Expand All @@ -114,26 +109,32 @@ jobs:
- name: Store Benchmark Result
run: |
if [[ "${{ matrix.python-version }}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
python ./.github/scripts/store_benchmark.py
working-directory: src

- name: Setup git config
- name: Create summary
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
echo '<details>' >> $GITHUB_STEP_SUMMARY
echo '<summary>Results</summary>' >> $GITHUB_STEP_SUMMARY
cat metrics/benchmarking/RESULTS.md >> $GITHUB_STEP_SUMMARY
echo '</details>' >> $GITHUB_STEP_SUMMARY
working-directory: src

- name: Git commit and push
run: |
if [[ "$(git status --porcelain)" == "" ]]; then
echo "Nothing new to commit"
else
git add --all
git commit -m "Generated from GitHub "${{ github.workflow }}" Workflow"
git push origin main
fi
working-directory: src
# - name: Setup git config
# if: ${{ github.event_name == 'release' }}
# run: |
# git config user.name 'github-actions[bot]'
# git config user.email 'github-actions[bot]@users.noreply.github.com'
# working-directory: src

# - name: Git commit and push
# if: ${{ github.event_name == 'release' }}
# run: |
# if [[ "$(git status --porcelain)" == "" ]]; then
# echo "Nothing new to commit"
# else
# git add --all
# git commit -m "Generated from GitHub "${{ github.workflow }}" Workflow"
# git push origin main
# fi
# working-directory: src
4 changes: 2 additions & 2 deletions .github/workflows/copyright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3

Expand Down
Loading

0 comments on commit 25665f5

Please sign in to comment.