-
Notifications
You must be signed in to change notification settings - Fork 2
118 lines (98 loc) · 3.56 KB
/
ci.yml
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: Implementation Testing
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
env:
CACHE_NUMBER: 0 # increase to reset cache manually
jobs:
foundation:
strategy:
matrix:
python-version: ["3.10"]
defaults:
run:
shell: bash -l {0}
name: linux-64-py${{ matrix.python-version }}
runs-on: ubuntu-latest
steps:
# checkout the code in this repository
- uses: actions/checkout@v4
with:
path: 'arc-activitysim'
# checkout the main branch of ActivitySim itself
- uses: actions/checkout@v4
with:
repository: 'ActivitySim/activitysim'
ref: main
path: 'activitysim'
fetch-depth: 0 # get all tags, lets setuptools_scm do its thing
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
activate-environment: asim-test
python-version: ${{ matrix.python-version }}
- name: Set cache date for year and month
run: echo "DATE=$(date +'%Y%m')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ~/conda_pkgs_dir
key: linux-64-conda-${{ hashFiles('activitysim/conda-environments/github-actions-tests.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
id: cache
- name: Update environment
run: |
conda env update -n asim-test -f activitysim/conda-environments/github-actions-tests.yml
- name: Install activitysim
# installing without dependencies is faster, we trust that all needed dependencies
# are in the conda environment defined above. Also, this avoids pip getting
# confused and reinstalling tables (pytables).
run: |
python -m pip install ./activitysim --no-deps
- name: Conda checkup
run: |
conda info -a
conda list
- name: Get the Fulton data
run: |
cd arc-activitysim
python scripts/fetch-fulton.py
- name: Run progressive tests
run: |
cd arc-activitysim
python -m pytest tests/test_activitysim.py
- name: Run without Sharrow
run: |
cd arc-activitysim
python scripts/run-fulton.py
- name: Upload legacy artifacts
uses: actions/upload-artifact@v4
with:
name: legacy-outputs
path: |
${{ github.workspace }}/arc-activitysim/output-fulton-legacy/final_*.csv
${{ github.workspace }}/arc-activitysim/output-fulton-legacy/*.log
${{ github.workspace }}/arc-activitysim/output-fulton-legacy/timing_log.csv
- name: Check legacy outputs
run: |
cd arc-activitysim
python scripts/check-fulton.py --check-dir ${{ github.workspace }}/arc-activitysim/output-fulton-legacy
- name: Run with Sharrow
run: |
cd arc-activitysim
python scripts/run-fulton.py --sharrow
- name: Upload Sharrow artifacts
uses: actions/upload-artifact@v4
with:
name: sharrow-outputs
path: |
${{ github.workspace }}/arc-activitysim/output-fulton-sharrow/final_*.csv
${{ github.workspace }}/arc-activitysim/output-fulton-sharrow/*.log
${{ github.workspace }}/arc-activitysim/output-fulton-sharrow/timing_log.csv
- name: Check sharrow outputs
run: |
cd arc-activitysim
python scripts/check-fulton.py --check-dir ${{ github.workspace }}/arc-activitysim/output-fulton-sharrow