Skip to content

Commit

Permalink
workflow cleanup (#14)
Browse files Browse the repository at this point in the history
* building conda env and package in different workflows
  • Loading branch information
procrastinatio authored Oct 10, 2024
1 parent c243a13 commit 242f035
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 19 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/conda.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build Conda Environnement

on:
push:
branches:
- '*'
tags:
- '*'
pull_request:
branches:
- develop2

jobs:
build:
runs-on: windows-latest # Only run on Windows

steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.9.18 # Set the specific Python version
auto-update-conda: true
activate-environment: TIE
channels: swisstopo,conda-forge,esri # default is included
channel-priority: flexible

- name: Install 7-Zip
run: choco install 7zip
shell: powershell

- name: Verify 7z availability
run: 7z
shell: powershell

- name: Conda in PowerShell
shell: powershell
run: |
conda info
conda list
- name: Install packages in PowerShell Core
shell: pwsh
run: |
conda install --channel conda-forge conda-build anaconda-client conda-verify
conda install --channel conda-forge geocube geopandas matplotlib mayavi numpy rasterio scipy "shapely>=2.0.0" scikit-image dask
conda build --help
conda info
conda list
echo $env:CONDA_PREFIX
- name: Set Package Version
shell: pwsh
run: |
$version = Get-Content toolbox/VERSION
echo "version=$version" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "=== PKG_VERSION=$version ==="
- name: Compress package with 7z
shell: pwsh
run: |
$PACKAGE_PATH = $env:PACKAGE_PATH
7z a TIE.7z $env:CONDA_PREFIX # Compress the package
- name: Upload Compressed Package
uses: actions/upload-artifact@v4
with:
name: conda-envs-TIE-${{ env.version }}.7z
path: TIE.7z # Upload the 7z compressed file
compression-level: 0 # no compression




19 changes: 0 additions & 19 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ jobs:
channels: swisstopo,conda-forge,esri # default is included
channel-priority: flexible

- name: Install 7-Zip
run: choco install 7zip
shell: powershell

- name: Verify 7z availability
run: 7z
shell: powershell

- name: Conda in PowerShell
shell: powershell
Expand All @@ -57,18 +50,6 @@ jobs:
echo "version=$version" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "=== PKG_VERSION=$version ==="
- name: Compress package with 7z
shell: pwsh
run: |
$PACKAGE_PATH = $env:PACKAGE_PATH
7z a TIE.7z $env:CONDA_PREFIX # Compress the package
- name: Upload Compressed Package
uses: actions/upload-artifact@v4
with:
name: conda-envs-TIE-${{ env.version }}.7z
path: TIE.7z # Upload the 7z compressed file
compression-level: 0 # no compression
- name: Build Conda Package
shell: pwsh
Expand Down

0 comments on commit 242f035

Please sign in to comment.