-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
27 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 |
---|---|---|
|
@@ -18,8 +18,6 @@ on: | |
env: | ||
PACKAGE_NAME: dpbench | ||
MODULE_NAME: dpbench | ||
# There is a separate action that removes defaults. | ||
CHANNELS: 'dppy/label/dev,conda-forge,intel,nodefaults' | ||
VER_JSON_NAME: 'version.json' | ||
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); " | ||
VER_SCRIPT2: "d = j['dpbench'][0]; print('='.join((d[s] for s in ('version', 'build'))))" | ||
|
@@ -54,38 +52,37 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
- name: Setup conda-build | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
activate-environment: "build" | ||
channels: ${{ env.CHANNELS }} | ||
auto-activate-base: true | ||
activate-environment: "" | ||
channel-priority: "disabled" | ||
run-post: false | ||
|
||
- name: Disable defautls | ||
run: conda config --remove channels defaults | ||
|
||
- name: Store conda paths as envs | ||
shell: bash -l {0} | ||
run: | | ||
echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\" '/' >> $GITHUB_ENV | ||
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV | ||
# boa is an extention to conda so we can use mamba resolver in conda build | ||
- name: Install conda-build | ||
run: mamba install boa | ||
run: conda install conda-build | ||
|
||
- name: Configure MSBuild | ||
if: runner.os == 'Windows' | ||
uses: microsoft/[email protected] | ||
with: | ||
vs-version: '14.35' | ||
|
||
- name: Set conda channels | ||
run: | | ||
conda config --append channels dppy/label/dev | ||
conda config --append channels conda-forge | ||
conda config --append channels nodefaults | ||
conda config --remove channels defaults | ||
- name: Build conda package | ||
run: conda mambabuild --no-test --python ${{ matrix.python }} conda-recipe | ||
run: conda build --python ${{ matrix.python }} conda-recipe | ||
|
||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
|
@@ -121,19 +118,20 @@ jobs: | |
continue-on-error: ${{ matrix.experimental }} | ||
|
||
steps: | ||
- name: Setup miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
- name: Setup conda-build | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
activate-environment: "build" | ||
channels: ${{ env.CHANNELS }} | ||
activate-environment: "" | ||
auto-activate-base: true | ||
channel-priority: "disabled" | ||
run-post: false | ||
|
||
- name: Disable defautls | ||
run: conda config --remove channels defaults | ||
- name: Set conda channels | ||
run: | | ||
conda config --append channels dppy/label/dev | ||
conda config --append channels conda-forge | ||
conda config --append channels nodefaults | ||
conda config --remove channels defaults | ||
- name: Store conda paths as envs | ||
shell: bash -l {0} | ||
|
@@ -159,7 +157,7 @@ jobs: | |
# Needed to be able to run conda index | ||
- name: Install conda-build | ||
run: mamba install conda-build conda-index | ||
run: conda install conda-build conda-index | ||
|
||
- name: Create conda channel | ||
run: python -m conda_index ${{ env.CHANNEL_PATH }} | ||
|
@@ -170,7 +168,7 @@ jobs: | |
cat ${{ env.VER_JSON_PATH }} | ||
- name: Install dpbench | ||
run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest intel::intel-opencl-rt python=${{ matrix.python }} -c ${{ env.CHANNEL_PATH }} | ||
run: conda install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest intel::intel-opencl-rt python=${{ matrix.python }} -c ${{ env.CHANNEL_PATH }} | ||
|
||
- name: Setup OpenCL CPU device | ||
if: runner.os == 'Windows' | ||
|