-
Notifications
You must be signed in to change notification settings - Fork 152
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
6 changed files
with
26 additions
and
29 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 |
---|---|---|
|
@@ -70,7 +70,6 @@ jobs: | |
- 3.9 | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- pure | ||
exclude: | ||
- os: macos-latest | ||
|
@@ -108,13 +107,12 @@ jobs: | |
bash "${MINICONDA_INSTALL_PATH_MACOS}/miniconda.sh" -b -u -p "${MINICONDA_INSTALL_PATH_MACOS}" | ||
rm -rf "${MINICONDA_INSTALL_PATH_MACOS}/miniconda.sh" | ||
echo "${MINICONDA_INSTALL_PATH_MACOS}/bin" >> "$GITHUB_PATH" | ||
echo "CONDA_EXE=${MINICONDA_INSTALL_PATH_MACOS}/bin/conda" >> "$GITHUB_ENV" | ||
- name: Setup Python ${{ matrix.python-version }} on MacOS | ||
if: ${{ startsWith( matrix.os, 'macos' ) }} | ||
shell: bash -l {0} | ||
run: | | ||
$CONDA_EXE init bash | ||
$CONDA_EXE create -y --name wheel_build_env python=${{ matrix.python-version }} | ||
conda init bash | ||
conda create -y --name wheel_build_env python=${{ matrix.python-version }} | ||
- name: Setup msbuild on Windows | ||
if: startsWith( matrix.os, 'windows' ) | ||
uses: microsoft/[email protected] | ||
|
@@ -139,7 +137,7 @@ jobs: | |
fi | ||
else | ||
if ${{ startsWith( matrix.os, 'macos' ) }}; then | ||
$CONDA_EXE activate wheel_build_env | ||
conda activate wheel_build_env | ||
fi | ||
pip install cmake ninja | ||
echo "/home/runner/.local/bin" >> $GITHUB_PATH | ||
|
@@ -171,8 +169,8 @@ jobs: | |
fi | ||
fi | ||
if ${{ startsWith( matrix.os, 'macos' ) }}; then | ||
$CONDA_EXE activate wheel_build_env | ||
$CONDA_EXE run -n wheel_build_env packaging/build_wheel.sh | ||
conda activate wheel_build_env | ||
conda run -n wheel_build_env packaging/build_wheel.sh | ||
else | ||
packaging/build_wheel.sh | ||
fi | ||
|
@@ -189,7 +187,7 @@ jobs: | |
pip3 install auditwheel | ||
fi | ||
if ${{ startsWith( matrix.os, 'macos' ) }}; then | ||
$CONDA_EXE activate wheel_build_env | ||
conda activate wheel_build_env | ||
fi | ||
pip3 install pkginfo | ||
for pkg in dist/torchdata*.whl; do | ||
|
@@ -216,8 +214,8 @@ jobs: | |
source packaging/manylinux/python_helper.sh | ||
fi | ||
if ${{ startsWith( matrix.os, 'macos' ) }}; then | ||
$CONDA_EXE activate wheel_build_env | ||
$CONDA_EXE run -n wheel_build_env pip3 install dist/torchdata*.whl | ||
conda activate wheel_build_env | ||
conda run -n wheel_build_env pip3 install dist/torchdata*.whl | ||
else | ||
pip3 install dist/torchdata*.whl | ||
fi | ||
|
@@ -233,8 +231,8 @@ jobs: | |
source packaging/manylinux/python_helper.sh | ||
fi | ||
if ${{ startsWith( matrix.os, 'macos' ) }}; then | ||
$CONDA_EXE activate wheel_build_env | ||
$CONDA_EXE run -n wheel_build_env python test/smoke_test/smoke_test.py | ||
conda activate wheel_build_env | ||
conda run -n wheel_build_env python test/smoke_test/smoke_test.py | ||
else | ||
if ${{ matrix.python-version == 'pure' }}; then | ||
python test/smoke_test/smoke_test.py --no-s3 | ||
|
@@ -320,7 +318,6 @@ jobs: | |
- 3.9 | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
steps: | ||
- name: Checkout Source Repository | ||
uses: actions/checkout@v3 | ||
|
@@ -363,18 +360,17 @@ jobs: | |
bash "${MINICONDA_INSTALL_PATH}/miniconda.sh" -b -u -p "${MINICONDA_INSTALL_PATH}" | ||
rm -rf "${MINICONDA_INSTALL_PATH}/miniconda.sh" | ||
echo "${MINICONDA_INSTALL_PATH}/bin" >> "$GITHUB_PATH" | ||
echo "CONDA_EXE=${MINICONDA_INSTALL_PATH}/bin/conda" >> "$GITHUB_ENV" | ||
${MINICONDA_INSTALL_PATH}/bin/conda init bash | ||
- name: Create Conda Env on MacOS and Linux | ||
if: ${{ ! startsWith( matrix.os, 'windows' ) }} | ||
shell: bash -l {0} | ||
run: | | ||
source "${MINICONDA_INSTALL_PATH}/etc/profile.d/conda.sh" | ||
if [[ ${{ matrix.python-version }} = "3.12" ]]; then | ||
$CONDA_EXE create -y -p "${CONDA_ENV_PATH}" python=3.9 | ||
if [[ ${{ matrix.python-version }} = "3.11" ]]; then | ||
conda create -y -p "${CONDA_ENV_PATH}" python=3.8 | ||
else | ||
$CONDA_EXE create -y -p "${CONDA_ENV_PATH}" python=${{ matrix.python-version }} | ||
conda create -y -p "${CONDA_ENV_PATH}" python=${{ matrix.python-version }} | ||
fi | ||
- name: Build TorchData for Conda | ||
shell: bash -l {0} | ||
|
@@ -387,10 +383,15 @@ jobs: | |
if ${{ ! startsWith( matrix.os, 'windows' ) }}; then | ||
source "${MINICONDA_INSTALL_PATH}/etc/profile.d/conda.sh" | ||
fi | ||
$CONDA_EXE activate "${CONDA_ENV_PATH}" | ||
$CONDA_EXE install -yq conda-build | ||
conda activate "${CONDA_ENV_PATH}" | ||
if [[ "${PYTHON_VERSION}" = "3.11" ]]; then | ||
conda install -yq conda-build -c malfet -c conda-forge | ||
export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c malfet" | ||
else | ||
conda install -yq conda-build | ||
fi | ||
packaging/build_conda.sh | ||
$CONDA_EXE index ./conda-bld | ||
conda index ./conda-bld | ||
- name: Upload Conda Package to Github | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
|
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
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
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
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
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