Skip to content

debug build

debug build #16

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
# Set CONDA_PREFIX on Windows to a shorter path
- name: Set CONDA_PREFIX (Windows)
if: matrix.os == 'windows-2022'
shell: powershell
run: |
New-Item -ItemType Directory -Force -Path C:\c
env:
CONDA_PREFIX: C:\c\tf
# Setup Miniconda
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3.0.3
with:
python-version: "3.10"
environment-file: environment.tensorflow.yml
activate-environment: tf
env:
CONDA_PREFIX: C:\c\tf
- name: Print environment info
shell: bash -l {0}
run: |
which python
conda info
env:
CONDA_PREFIX: C:\c\tf
# Build conda package (Windows)
- name: Build conda package (Windows)
if: matrix.os == 'windows-2022'
shell: powershell
run: |
conda build --debug .conda.tensorflow --output-folder C:\c\build.tensorflow -c conda-forge
env:
CONDA_PREFIX: C:\c\tf
# Build conda package (Ubuntu)
- 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