-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make conda prefix directory shorter again
- Loading branch information
Showing
1 changed file
with
18 additions
and
15 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 |
---|---|---|
|
@@ -28,10 +28,13 @@ jobs: | |
matrix: | ||
os: ["ubuntu-22.04", "windows-2022", "macos-14"] | ||
include: | ||
- os-folder: win-64 | ||
- os-folder: linux-64 | ||
- build-folder: .conda.tensorflow | ||
- os: "ubuntu-22.04" | ||
os-folder: linux-64 | ||
- os-shell: bash -l {0} | ||
- os: "windows-2022" | ||
os-folder: win-64 | ||
os-shell: powershell | ||
env-prefix: C:\c\ | ||
- os: "macos-14" | ||
os-folder: osx-arm64 | ||
build-folder: .conda.tensorflow_macos | ||
|
@@ -41,13 +44,19 @@ jobs: | |
if: env.RUN_BUILD_JOB == 'true' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Make conda prefix directory (Windows) | ||
if: matrix.os == "windows-2022" | ||
shell: powershell | ||
run: | | ||
New-Item -ItemType Directory -Force -Path ${{ matrix.env-prefix }} | ||
- name: Setup Miniconda | ||
if: env.RUN_BUILD_JOB == 'true' | ||
uses: conda-incubator/[email protected] | ||
with: | ||
python-version: "3.10" | ||
environment-file: environment.tensorflow.yml | ||
activate-environment: tf | ||
activate-environment: ${{ matrix.env-prefix }}tf | ||
|
||
- name: Print environment info | ||
if: env.RUN_BUILD_JOB == 'true' | ||
|
@@ -57,25 +66,19 @@ jobs: | |
conda info | ||
conda list | ||
- name: Build conda package (${{ matrix.os }}) | ||
if: (runner.os == 'Windows') && (env.RUN_BUILD_JOB == 'true') | ||
shell: powershell | ||
run: | | ||
conda build --debug ${{ matrix.build-folder }} --output-folder build.tensorflow -c conda-forge | ||
- name: Build conda package (${{ matrix.os }}) | ||
if: (runner.os != 'Windows') && (env.RUN_BUILD_JOB == 'true') | ||
shell: bash -l {0} | ||
- name: Build conda package | ||
if: env.RUN_BUILD_JOB == 'true' | ||
shell: matrix.os-shell | ||
run: | | ||
conda build --debug ${{ matrix.build-folder }} --output-folder build.tensorflow -c conda-forge | ||
conda build --debug ${{ matrix.build-folder }} --output-folder ${{ matrix.env-prefix }}build.tensorflow -c conda-forge | ||
# Upload the build artifact incase anaconda upload fails | ||
- name: Upload conda package artifact | ||
if: env.RUN_BUILD_JOB == 'true' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tensorflow-build-${{ matrix.os-folder }} | ||
path: build.tensorflow # Upload entire build directory | ||
path: ${{ matrix.env-prefix }}build.tensorflow # Upload entire build directory | ||
retention-days: 1 | ||
|
||
upload: | ||
|