Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
DonJayamanne committed Jun 5, 2024
1 parent 76040b4 commit a9e83e3
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 110 deletions.
220 changes: 110 additions & 110 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,60 +66,60 @@ jobs:
- name: Check Conda version
run: conda info --all

- name: Install pipenv
run: pip install pipenv

- name: Check pipenv version
run: pipenv --version

- name: Install virtualenvwrapper
if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
run: |
pip install virtualenvwrapper
echo "WORKON_HOME=$HOME/.virtualenvs" >> $GITHUB_ENV
shell: bash

- name: Install virtualenvwrapper-win
if: startsWith( matrix.os, 'windows')
run: |
pip install virtualenvwrapper-win
echo "WORKON_HOME=$HOME/.virtualenvs" >> $GITHUB_ENV
shell: bash

- name: Install pyenv
if: startsWith( matrix.os, 'windows')
run: |
choco install pyenv-win -y
echo "PATH=$PATH;$HOME/.pyenv/pyenv-win/bin;$HOME/.pyenv/pyenv-win/shims" >> $GITHUB_ENV
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
shell: bash

- name: Install pyenv and pyenv-virtualenv
if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
run: |
curl https://pyenv.run | bash
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
echo "PATH=$HOME/.pyenv/bin:$PATH" >> $GITHUB_ENV
shell: bash

- name: Check Pyenv version
run: pyenv --version
shell: bash

- name: Install Pyenv Python(s)
if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
run: |
pyenv install --list
pyenv install 3.12.3 3.11.9 3.10.14 3.9.19 3.8.19
shell: bash

# pyenv-win install list has not updated for a while
- name: Install Pyenv Python(s)
if: startsWith( matrix.os, 'windows')
run: |
pyenv install --list
pyenv install 3.10.5 3.9.13 3.8.10
shell: bash
# - name: Install pipenv
# run: pip install pipenv

# - name: Check pipenv version
# run: pipenv --version

# - name: Install virtualenvwrapper
# if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
# run: |
# pip install virtualenvwrapper
# echo "WORKON_HOME=$HOME/.virtualenvs" >> $GITHUB_ENV
# shell: bash

# - name: Install virtualenvwrapper-win
# if: startsWith( matrix.os, 'windows')
# run: |
# pip install virtualenvwrapper-win
# echo "WORKON_HOME=$HOME/.virtualenvs" >> $GITHUB_ENV
# shell: bash

# - name: Install pyenv
# if: startsWith( matrix.os, 'windows')
# run: |
# choco install pyenv-win -y
# echo "PATH=$PATH;$HOME/.pyenv/pyenv-win/bin;$HOME/.pyenv/pyenv-win/shims" >> $GITHUB_ENV
# echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
# shell: bash

# - name: Install pyenv and pyenv-virtualenv
# if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
# run: |
# curl https://pyenv.run | bash
# echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
# echo "PATH=$HOME/.pyenv/bin:$PATH" >> $GITHUB_ENV
# shell: bash

# - name: Check Pyenv version
# run: pyenv --version
# shell: bash

# - name: Install Pyenv Python(s)
# if: startsWith( matrix.os, 'ubuntu') || startsWith( matrix.os, 'macos')
# run: |
# pyenv install --list
# pyenv install 3.12.3 3.11.9 3.10.14 3.9.19 3.8.19
# shell: bash

# # pyenv-win install list has not updated for a while
# - name: Install Pyenv Python(s)
# if: startsWith( matrix.os, 'windows')
# run: |
# pyenv install --list
# pyenv install 3.10.5 3.9.13 3.8.10
# shell: bash

- name: Rust Tool Chain setup
uses: dtolnay/rust-toolchain@stable
Expand All @@ -132,66 +132,66 @@ jobs:
shell: bash

- name: Run Tests
run: cargo test --frozen --all-features
run: cargo test --frozen --all-features -- --nocapture
shell: bash

- name: Find Environments
if: matrix.run_cli == 'yes'
run: cargo run --release --target ${{ matrix.target }}
shell: bash

builds:
name: Builds
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
run_cli: "yes"
# - os: ubuntu-latest
# target: aarch64-unknown-linux-gnu
# - os: ubuntu-latest
# target: arm-unknown-linux-gnueabihf
- os: macos-latest
target: x86_64-apple-darwin
run_cli: "yes"
- os: macos-14
target: aarch64-apple-darwin
run_cli: "yes"
# - os: ubuntu-latest
# target: x86_64-unknown-linux-gnu
# - os: ubuntu-latest
# target: aarch64-unknown-linux-musl
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Rust Tool Chain setup
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}

- name: Cargo Fetch
run: cargo fetch
shell: bash

- name: Run Tests
run: cargo test --frozen --all-features
shell: bash

- name: Build
run: cargo build --release --target ${{ matrix.target }}
shell: bash

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: pet-${{ matrix.target }}
path: target/${{ matrix.target }}/release/pet*
# builds:
# name: Builds
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - os: windows-latest
# target: x86_64-pc-windows-msvc
# - os: windows-latest
# target: aarch64-pc-windows-msvc
# - os: ubuntu-latest
# target: x86_64-unknown-linux-musl
# run_cli: "yes"
# # - os: ubuntu-latest
# # target: aarch64-unknown-linux-gnu
# # - os: ubuntu-latest
# # target: arm-unknown-linux-gnueabihf
# - os: macos-latest
# target: x86_64-apple-darwin
# run_cli: "yes"
# - os: macos-14
# target: aarch64-apple-darwin
# run_cli: "yes"
# # - os: ubuntu-latest
# # target: x86_64-unknown-linux-gnu
# # - os: ubuntu-latest
# # target: aarch64-unknown-linux-musl
# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - name: Rust Tool Chain setup
# uses: dtolnay/rust-toolchain@stable
# with:
# toolchain: stable
# targets: ${{ matrix.target }}

# - name: Cargo Fetch
# run: cargo fetch
# shell: bash

# - name: Run Tests
# run: cargo test --frozen --all-features
# shell: bash

# - name: Build
# run: cargo build --release --target ${{ matrix.target }}
# shell: bash

# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# with:
# name: pet-${{ matrix.target }}
# path: target/${{ matrix.target }}/release/pet*
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions crates/pet-conda/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ pet-core = { path = "../pet-core" }
pet-utils = { path = "../pet-utils" }
log = "0.4.21"
regex = "1.10.4"

[dev-dependencies]
needs_env_var = "1.0.0"
3 changes: 3 additions & 0 deletions crates/pet-conda/tests/ci_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
// Licensed under the MIT License.

mod common;
use needs_env_var::needs_env_var;

#[cfg(unix)]
#[test]
#[needs_env_var(CI)]
fn conda_ci() {
use pet_conda::Conda;
use pet_core::{os_environment::EnvironmentApi, Locator};
Expand All @@ -16,3 +18,4 @@ fn conda_ci() {
println!("SERVER CI Started");
println!("SERVER CI REsults{:?}", result);
}

0 comments on commit a9e83e3

Please sign in to comment.