Skip to content

Commit 0d9b953

Browse files
committed
Fix trigger and variables
1 parent 65002e4 commit 0d9b953

File tree

6 files changed

+55
-85
lines changed

6 files changed

+55
-85
lines changed

.github/actions/early_return_for_forked_pull_requests/action.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/actions/linux/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ inputs:
55
runs:
66
using: composite
77
steps:
8-
- uses: actions/checkout@v4.1.0
98
- name: Preparing environment - Conda
109
run: |-
1110
curl -o Miniconda3-py38_4.8.3-Linux-x86_64.sh https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.3-Linux-x86_64.sh
@@ -20,4 +19,4 @@ runs:
2019
run: |-
2120
~/miniconda3/bin/conda init bash
2221
~/miniconda3/bin/conda create -n hydra python=${{ inputs.py_version }} -yqc conda-forge
23-
shell: bash
22+
shell: bash

.github/actions/macos/action.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ inputs:
55
runs:
66
using: composite
77
steps:
8-
- uses: actions/checkout@v4.1.0
98
- name: restore_cache
109
uses: actions/cache@v3.3.2
1110
with:
1211
key: "-${{ inputs.cache_key_version }}-macos-sys-{{ .Branch }}-${{ inputs.py_version }}"
13-
path: UPDATE_ME
12+
path: |-
13+
~/miniconda3
14+
~/Library/Caches/Homebrew
15+
- uses: maxim-lobanov/setup-xcode@v1.6.0
16+
with:
17+
xcode-version: latest-stable
1418
- name: Preparing environment - Conda
1519
run: |-
1620
if [[ -f ~/miniconda3/LICENSE.txt ]] ; then
@@ -31,6 +35,8 @@ runs:
3135
shell: bash
3236
- name: Preparing environment - Hydra
3337
run: |-
38+
source $HOME/.bash_profile
39+
echo $PATH
3440
conda create -n hydra python=${{ inputs.py_version }} -yqc conda-forge
3541
conda run -n hydra pip install nox --progress-bar off
3642
shell: bash
@@ -40,4 +46,4 @@ runs:
4046
path: |-
4147
~/miniconda3
4248
~/Library/Caches/Homebrew
43-
key: "-${{ inputs.cache_key_version }}-macos-sys-{{ .Branch }}-${{ inputs.py_version }}"
49+
key: "-${{ inputs.cache_key_version }}-macos-sys-{{ .Branch }}-${{ inputs.py_version }}"

.github/actions/windows/action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: windows
2+
inputs:
3+
py_version:
4+
required: true
5+
runs:
6+
using: composite
7+
steps:
8+
- uses: conda-incubator/setup-miniconda@v3
9+
with:
10+
miniconda-version: "latest"
11+
python-version: ${{ inputs.py_version }}
12+
activate-environment: hydra
13+
- uses: actions/setup-java@v4
14+
with:
15+
distribution: 'microsoft'
16+
java-version: '21'

.github/workflows/core_tests.yml

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,8 @@
11
name: facebookresearch/hydra/core_tests
22
on:
3-
workflow_dispatch:
4-
inputs:
5-
plugin_test:
6-
required: true
7-
test_plugins:
8-
required: true
9-
cache_key_version:
10-
required: false
11-
default: v1
12-
env:
13-
AWS_ACCESS_KEY_ID: xxxxXT3Z
14-
AWS_DEFAULT_REGION: xxxxst-2
15-
AWS_SECRET_ACCESS_KEY: xxxxGsxB
16-
CIRCLECI_TOKEN: xxxxed79
17-
INSTANCE_ROLE_ARN: xxxxr-v1
3+
push
184
jobs:
19-
trigger_plugin_pipelines:
20-
if: ${{ !(${{ inputs.plugin_test }}) }}
21-
runs-on: ubuntu-latest
22-
container:
23-
image: python:3.8
24-
steps:
25-
- uses: "./.github/actions/early_return_for_forked_pull_requests"
26-
- uses: actions/checkout@v4.1.0
27-
- name: Kick off Plugin tests
28-
run: |-
29-
python tools/ci/circleci_pipeline.py
30-
echo "Done kicking off plugin tests."
315
test_macos:
32-
if: ${{ !(${{ inputs.plugin_test }}) }}
336
runs-on: macos-latest
347
strategy:
358
matrix:
@@ -40,14 +13,12 @@ jobs:
4013
- '3.11'
4114
steps:
4215
- uses: actions/checkout@v4.1.0
43-
- uses: maxim-lobanov/setup-xcode@v1.6.0
44-
with:
45-
xcode-version: 13.4.1
4616
- uses: "./.github/actions/macos"
4717
with:
4818
py_version: "${{ matrix.py_version }}"
4919
- name: Testing Hydra
5020
run: |-
21+
source $HOME/.bash_profile
5122
export NOX_PYTHON_VERSIONS=${{ matrix.py_version }}
5223
conda activate hydra
5324
pip install nox dataclasses --progress-bar off
@@ -58,10 +29,7 @@ jobs:
5829
nox -s lint test_tools test_core test_jupyter_notebooks -ts
5930
fi
6031
test_linux:
61-
if: ${{ !(${{ inputs.plugin_test }}) }}
6232
runs-on: ubuntu-latest
63-
container:
64-
image: ubuntu
6533
strategy:
6634
matrix:
6735
py_version:
@@ -86,8 +54,7 @@ jobs:
8654
nox -s lint test_tools test_core test_jupyter_notebooks -ts
8755
fi
8856
test_win:
89-
if: ${{ !(${{ inputs.plugin_test }}) }}
90-
runs-on: ubuntu-latest
57+
runs-on: windows-latest
9158
strategy:
9259
matrix:
9360
py_version:
@@ -96,25 +63,22 @@ jobs:
9663
- '3.10'
9764
- '3.11'
9865
steps:
99-
# # This item has no matching transformer
100-
# - circleci_windows_:
66+
- uses: actions/checkout@v4.1.0
67+
- uses: "./.github/actions/windows"
10168
- name: Testing Hydra
10269
run: |-
103-
$env:NOX_PYTHON_VERSIONS="${{ matrix.py_version }}"
104-
$env:ConEmuDefaultCp=65001
105-
$env:PYTHONIOENCODING="utf_8"
106-
conda activate hydra
107-
If ($env:${{ github.event.number }}) {
70+
conda run -n hydra pip install nox --progress-bar off
71+
set NOX_PYTHON_VERSIONS="${{ matrix.py_version }}"
72+
set ConEmuDefaultCp=65001
73+
set PYTHONIOENCODING="utf_8"
74+
If ("${{ github.event.number }}") {
10875
nox -s lint test_tools test_core test_jupyter_notebooks lint_plugins test_plugins test_plugins_vs_core -ts
10976
} else {
11077
nox -s lint test_tools test_core test_jupyter_notebooks -ts
11178
}
11279
exit $LASTEXITCODE
11380
test_linux_omc_dev:
114-
if: ${{ !(${{ inputs.plugin_test }}) }}
11581
runs-on: ubuntu-latest
116-
container:
117-
image: ubuntu
11882
strategy:
11983
matrix:
12084
py_version:

.github/workflows/plugin_tests.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
name: facebookresearch/hydra/plugin_tests
22
on:
3-
workflow_dispatch:
3+
push:
44
inputs:
5-
plugin_test:
6-
required: true
75
test_plugins:
86
required: true
9-
cache_key_version:
10-
required: false
11-
default: v1
12-
env:
13-
AWS_ACCESS_KEY_ID: xxxxXT3Z
14-
AWS_DEFAULT_REGION: xxxxst-2
15-
AWS_SECRET_ACCESS_KEY: xxxxGsxB
16-
CIRCLECI_TOKEN: xxxxed79
17-
INSTANCE_ROLE_ARN: xxxxr-v1
7+
default: hydra_rq_launcher,hydra_ax_sweeper,hydra_submitit_launcher,hydra_nevergrad_sweeper
188
jobs:
9+
echo_event_number:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4.1.0
13+
- uses: "./.github/actions/linux"
14+
with:
15+
py_version: '3.11'
16+
- name: "echo event number"
17+
run: |-
18+
echo ${{ github.event.number }}
1919
test_plugin_linux:
20-
if: ${{ inputs.plugin_test }}
20+
if: github.event.number
2121
runs-on: ubuntu-latest
22-
container:
23-
image: ubuntu
2422
strategy:
2523
matrix:
2624
py_version:
@@ -43,7 +41,7 @@ jobs:
4341
pip install nox dataclasses --progress-bar off
4442
nox -s lint_plugins test_plugins test_plugins_vs_core -ts
4543
test_plugin_macos:
46-
if: ${{ inputs.plugin_test }}
44+
if: github.event.number
4745
runs-on: macos-latest
4846
strategy:
4947
matrix:
@@ -56,22 +54,20 @@ jobs:
5654
- "${{ inputs.test_plugins }}"
5755
steps:
5856
- uses: actions/checkout@v4.1.0
59-
- uses: maxim-lobanov/setup-xcode@v1.6.0
60-
with:
61-
xcode-version: 13.4.1
6257
- uses: "./.github/actions/macos"
6358
with:
6459
py_version: "${{ matrix.py_version }}"
6560
- name: "${{ matrix.test_plugin }}"
6661
run: |-
62+
source $HOME/.bash_profile
6763
export NOX_PYTHON_VERSIONS=${{ matrix.py_version }}
6864
export PLUGINS=${{ matrix.test_plugin }}
6965
conda activate hydra
7066
pip install nox dataclasses --progress-bar off
7167
nox -s lint_plugins test_plugins test_plugins_vs_core -ts
7268
test_plugin_win:
73-
if: ${{ inputs.plugin_test }}
74-
runs-on: ubuntu-latest
69+
if: github.event.number
70+
runs-on: windows-latest
7571
strategy:
7672
matrix:
7773
py_version:
@@ -82,8 +78,8 @@ jobs:
8278
test_plugin:
8379
- "${{ inputs.test_plugins }}"
8480
steps:
85-
# # This item has no matching transformer
86-
# - circleci_windows_:
81+
- uses: actions/checkout@v4.1.0
82+
- uses: "./.github/actions/windows"
8783
- name: "${{ matrix.test_plugin }}"
8884
run: |-
8985
$env:NOX_PYTHON_VERSIONS="${{ matrix.py_version }}"

0 commit comments

Comments
 (0)