-
Notifications
You must be signed in to change notification settings - Fork 1
133 lines (105 loc) · 3.3 KB
/
test.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: test
on:
push:
branches:
- main
pull_request:
paths-ignore:
- .github/workflows/release.yml
jobs:
prepare-ieee:
uses: ./.github/workflows/prepare.yml
secrets:
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
build:
runs-on: ${{ matrix.os }}
needs: [ prepare-ieee ]
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
java: [ 1.8 ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
experimental: [ false ]
steps:
- uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
- uses: actions/[email protected]
with:
name: ieee-test-input
path: ieee
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
rubygems: latest
# bundler: 2.5.10
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- if: matrix.os == 'windows-latest'
uses: nick-invision/retry@v1
with:
polling_interval_seconds: 5
timeout_minutes: 5
max_attempts: 3
command: choco install --no-progress make gnuwin32-coreutils.install curl yq wget
- if: matrix.os == 'macos-latest'
run: brew install maven yq
- if: matrix.os == 'ubuntu-latest'
run: sudo snap install yq
- if: matrix.os == 'ubuntu-latest'
run: gem install metanorma-cli
- if: matrix.os != 'ubuntu-latest'
run: gem install metanorma-cli
- if: matrix.os == 'ubuntu-latest'
run: |
mkdir ~/bundle_tmp
bundle config path ~/bundle_tmp
- run: bundle update
- run: make testMN2STS
- run: make testSTS2MN
- run: make testMN2IEEE
- run: make NISO-STS-Standard
- if: matrix.os == 'ubuntu-latest'
name: Notify mn-samples-bsi
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
repository: metanorma/mn-samples-bsi
event-type: metanorma/mnconvert
client-payload: '{ "ref": "${{ github.ref }}" }'
- run: make mn2stsDTD_NISO
- run: make mn2stsDTD_ISO
- run: make all
- run: make publish
- uses: actions/upload-artifact@master
with:
name: published-${{ matrix.os }}
path: published
deploy-gh-pages:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: published-ubuntu-latest
path: published
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ github.token }}
publish_dir: ./published
force_orphan: true
user_name: ${{ github.actor }}
user_email: ${{ format('{0}@users.noreply.github.com', github.actor) }}
commit_message: "${{ format('Deploy to GitHub Pages: {0}', github.sha) }}"