-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (77 loc) · 2.37 KB
/
ubuntu-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Ubuntu-build
on:
push:
branches:
- 'main'
- 'develop'
- 'releases/**'
tags:
- '*'
pull_request:
branches:
- 'main'
- 'develop'
- 'releases/**'
jobs:
build:
name: Testing Ubuntu build
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -el {0}
steps:
- name: git clone step
uses: actions/checkout@v4
with:
submodules: recursive
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: false
docker-images: true
swap-storage: true
- name: Create miniconda ml without environment file
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
activate-environment: ml
auto-activate-base: false
- name: List environment A
run: |
conda info --envs
conda info
conda list
- name: Download and or upload cache of Conda env
# GitHub will remove entries that have not been accessed in >7 days.Size of all caches in a repository is limited to 10 GB.
uses: actions/cache@v3
id: cache
env:
# Increase this value to reset cache if .yml has not changed but packages have
CACHE_NUMBER: 0
with:
path: ${{ env.CONDA }}/envs
key: ubuntu-build-${{ hashFiles('ubuntu.yml') }}
- name: Update environment based on the environment file if the cache does not exist.
run: conda env update -n ml -f ubuntu.yml
if: steps.cache.outputs.cache-hit != 'true'
# - name: List environment B
# run: |
# conda info --envs
# conda info
# conda list
# - name: Test IO modules
# run: python -m pytest -vvv tests/test_io.py
#
# - name: Test embeddings modules
# run: python -m pytest -vvv tests/test_embeddings.py
#
# - name: Test AO modules
# run: python -m pytest -vvv tests/test_ao.py