Skip to content

canary installation #584

canary installation

canary installation #584

name: canary installation
on:
schedule:
# Run the tests once every 24 hours to catch dependency problems early
- cron: '0 7 * * *'
push:
branches:
- install-canary
jobs:
canary-installs:
timeout-minutes: 12
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ["3.10", "3.11"]
defaults:
run:
shell: bash -l {0}
steps:
- name: Setup python ${{ matrix.python-version }} conda environment
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
miniconda-version: "latest"
- name: Install activity-browser
run: |
conda create -y -n ab -c conda-forge --solver libmamba activity-browser python=${{ matrix.python-version }}
- name: Environment info
run: |
conda activate ab
conda list
conda env export
conda env export -f env.yaml
- name: Upload final environment as artifact
uses: actions/upload-artifact@v4
with:
name: env-${{ matrix.os }}-${{ matrix.python-version }}
path: env.yaml
# also run install with micromamba instead of conda to have a timing comparison
canary-installs-mamba:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.11']
defaults:
run:
shell: bash -l {0}
steps:
- name: Setup python ${{ matrix.python-version }} conda environment
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.9-1'
environment-name: ab
create-args: >-
python=${{ matrix.python-version }}
activity-browser
- name: Environment info
run: |
micromamba list
micromamba env export
micromamba env export > env.yaml
- name: Upload final environment as artifact
uses: actions/upload-artifact@v4
with:
name: env-${{ matrix.os }}-${{ matrix.python-version }}-mamba
path: env.yaml
conda-micromamba-comparison:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
needs:
- canary-installs
- canary-installs-mamba
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
- name: show files
run: |
ls -la
- name: correct yaml formatting
# add correct indentation to make diffing possible
uses: mikefarah/yq@master
with:
cmd: |
ls | grep mamba | while read d; do yq -i $d/env.yaml; done
- name: diff ubuntu
run: |
diff -u env-ubuntu-latest-3.11* || :
- name: diff windows
run: |
diff -u env-windows-latest-3.11* || :
- name: diff macos
run: |
diff -u env-macos-latest-3.11* || :