-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (71 loc) · 2.01 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
name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- main
concurrency:
group: '${{ github.workflow }}-${{ github.ref_name }}'
cancel-in-progress: true
jobs:
#----------------------------------------------------------------------------
# Cache LFS: Checkout LFS data and update the cache to limit LFS bandwidth
#----------------------------------------------------------------------------
cache_lfs:
runs-on: ubuntu-latest
name: Update LFS data cache
outputs:
lfs_sha: ${{ steps.lfs_sha.outputs.lfs_sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: 'lfs-data-cache_action'
fetch-depth: 0
- name: Use lfs-data-cache action
id: lfs-data-cache
uses: ./lfs-data-cache_action
with:
type: 'producer'
repository: 'f3d-app/f3d'
cache_postfix: 'ci-cache'
- name: Set output
id: lfs_sha
shell: bash
run: echo "lfs_sha=$(steps.lfs-data-cache.outputs.lfs_sha)" >> $GITHUB_OUTPUT
ci:
name: CI
needs: cache_lfs
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
runs-on: ${{matrix.os}}
steps:
- name: Output directory
shell: bash
run: mkdir output_dir
- name: Checkout
uses: actions/checkout@v4
with:
path: 'lfs-data-cache_action'
fetch-depth: 0
- name: Use lfs-data-cache action
uses: ./lfs-data-cache_action
with:
type: 'consumer'
repository: 'f3d-app/f3d'
lfs_sha: ${{ needs.cache_lfs.outputs.lfs_sha}}
cache_postfix: 'ci-cache'
target_directory: 'output_dir'
- name: Check output has expected size
shell: bash
run: |
if [[ `cat output_dir/testing/data/f3d.vtp | wc -c` == 4104 ]]; then
echo "File is of expected size"
exit 0
else
echo "File is not of expected size"
exit 1
fi