try substitution for input and output #12
Workflow file for this run
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
name: Build TensorFlow | |
on: | |
push: | |
branches: | |
- main | |
- elizabeth/add-windows-linux-tensorflow-conda-package | |
paths: | |
- '.github/workflows/build_tensorflow.yml' | |
- '.conda.tensorflow/**' | |
- 'environment.tensorflow.yml' | |
- 'requirements.tensorflow.txt' | |
jobs: | |
build: | |
name: Build package (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-22.04", "windows-2022"] | |
steps: | |
# Checkout the repository | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# # Enable Windows Long Path Support | |
# - name: Enable Windows Long Path Support | |
# if: matrix.os == 'windows-2022' | |
# run: | | |
# reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f | |
# shell: powershell | |
# Setup Miniconda | |
- name: Setup Miniconda | |
# https://github.com/conda-incubator/setup-miniconda | |
uses: conda-incubator/setup-miniconda@v3.0.3 | |
with: | |
python-version: "3.10" | |
environment-file: environment.tensorflow.yml | |
activate-environment: tf | |
- name: Print environment info | |
shell: bash -l {0} | |
run: | | |
which python | |
conda info | |
# # Create a shortened link on Windows | |
# - name: Create shortened link (Windows) | |
# if: matrix.os == 'windows-2022' | |
# shell: powershell | |
# run: | | |
# New-Item -ItemType Directory -Force -Path C:\c | |
# robocopy $PWD C:\c /E /NFL /NDL /NJH /NJS /NC /NS /NP | |
# Build conda package | |
- name: Build conda package (Windows) | |
if: matrix.os == 'windows-2022' | |
shell: powershell | |
run: | | |
subst X: $PWD | |
conda build X:\.conda.tensorflow --output-folder X:\build.tensorflow -c conda-forge | |
- name: Build conda package (Ubuntu) | |
if: matrix.os == 'ubuntu-22.04' | |
shell: bash -l {0} | |
run: | | |
conda build .conda.tensorflow --output-folder build.tensorflow -c conda-forge | |
# # Upload conda package | |
# - name: Upload to Anaconda (Windows) | |
# if: matrix.os == 'windows-2022' | |
# env: | |
# ANACONDA_LOGIN: ${{ secrets.ANACONDA_LOGIN }} | |
# shell: powershell | |
# run: | | |
# anaconda login --username sleap-deps --password "$env:ANACONDA_LOGIN" | |
# anaconda -v upload "build.tensorflow\win-64\*.tar.bz2" --label dev --channel sleap-deps | |
# anaconda logout | |
# - name: Upload to Anaconda (Ubuntu) | |
# if: matrix.os == 'ubuntu-22.04' | |
# env: | |
# ANACONDA_LOGIN: ${{ secrets.ANACONDA_LOGIN }} | |
# shell: bash -l {0} | |
# run: | | |
# anaconda login --username sleap-deps --password "$ANACONDA_LOGIN" | |
# anaconda -v upload build.tensorflow/linux-64/*.tar.bz2 --label dev --channel sleap-deps | |
# anaconda logout |