-
Notifications
You must be signed in to change notification settings - Fork 7
76 lines (76 loc) · 3.18 KB
/
main.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
on: [push, pull_request]
name: Build
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
build_mode: [dev, prod, coverage]
runs-on: ${{ matrix.os }}
name: Build
steps:
- name: Get VSS
uses: actions/checkout@v3
with:
path: ./vss
- name: Force Alire use preinstalled MSYS2
if: ${{ runner.os == 'Windows' }}
run: |
mkdir -p ~/.config/alire
echo '[msys2]' > ~/.config/alire/config.toml
echo 'install_dir = "C:\\msys64"' >> ~/.config/alire/config.toml
- uses: actions/cache@v3
with:
path: ./cached_gnat
key: ${{ runner.os }}-alire_v3
restore-keys: ${{ runner.os }}-alire_v3
- name: Get GNAT toolchain with alire
uses: alire-project/setup-alire@v2
with:
toolchain: gnat_native^13 gprbuild^22
toolchain_dir: ./cached_gnat
- name: Get XmlAda with alire
shell: bash
run: |
export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH
alr get xmlada --build
echo "XMLADA_CRATE_ROOT=`pwd`/`alr get xmlada --dirname`" >> $GITHUB_ENV
- name: Export OS=osx on macOS
if: ${{ runner.os == 'macOS' }}
run: echo "OS=osx" >> $GITHUB_ENV
- name: Get UCD.zip
run: |
curl -C - -o UCD-15.1.0.zip https://www.unicode.org/Public/15.1.0/ucd/UCD.zip
mkdir vss/data/ucd
unzip UCD-15.1.0.zip -d vss/data/ucd
- name: Get Emoji data
run: |
mkdir vss/data/emoji
curl -o vss/data/emoji/ReadMe.txt https://www.unicode.org/Public/emoji/15.1/ReadMe.txt
curl -o vss/data/emoji/emoji-sequences.txt https://www.unicode.org/Public/emoji/15.1/emoji-sequences.txt
curl -o vss/data/emoji/emoji-test.txt https://www.unicode.org/Public/emoji/15.1/emoji-test.txt
curl -o vss/data/emoji/emoji-zwj-sequences.txt https://www.unicode.org/Public/emoji/15.1/emoji-zwj-sequences.txt
- name: Get regexp tests
run: |
curl -C - -o vss/data/re_tests https://raw.githubusercontent.com/Perl/perl5/blead/t/re/re_tests
- name: Get parse-number-fxx-test-data repository
uses: actions/checkout@v3
with:
repository: nigeltao/parse-number-fxx-test-data
path: ./vss/data/parse-number-fxx-test-data
- name: Build and test
shell: bash
run: |
export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH
export GPR_PROJECT_PATH=$XMLADA_CRATE_ROOT/input_sources:$GPR_PROJECT_PATH
export GPR_PROJECT_PATH=$XMLADA_CRATE_ROOT/sax:$GPR_PROJECT_PATH
export GPR_PROJECT_PATH=$XMLADA_CRATE_ROOT/unicode:$GPR_PROJECT_PATH
make -C vss build-libs-static check coverage BUILD_MODE=${{ matrix.build_mode }}
make -C vss install-libs-static check_install PREFIX=/tmp BUILD_MODE=${{ matrix.build_mode }}
make -C vss misc BUILD_MODE=${{ matrix.build_mode }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: ${{ matrix.build_mode == 'coverage' }}
with:
working-directory: vss