Skip to content

Merge branch 'topic/vadim/win' into 'master' #1422

Merge branch 'topic/vadim/win' into 'master'

Merge branch 'topic/vadim/win' into 'master' #1422

Workflow file for this run

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