-
Notifications
You must be signed in to change notification settings - Fork 5
91 lines (80 loc) · 2.67 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
on:
push:
branches:
- master
pull_request:
branches:
- master
name: Linux CI
jobs:
build:
runs-on: ubuntu-latest
name: Linux build & test
env:
PROCESSORS: 0
PREFIX: /tmp/ADALIB_DIR
GPR_PROJECT_PATH: /tmp/ADALIB_DIR/share/gpr
steps:
- name: Get lkql
uses: actions/checkout@v2
- name: Setup Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Get langkit
uses: actions/checkout@v2
with:
repository: AdaCore/langkit
path: langkit
fetch-depth: 0 # all branches
- name: Install Python dependencies
run: |
pip install -r requirements.txt
pip install e3-testsuite
- uses: actions/cache@v2
with:
path: ./cached_gnat
key: ${{ runner.os }}-gnat-ce-2020
- name: Get GNAT Community 2020 toolchain
uses: ada-actions/toolchain@52618bd1ec9fcc3072de8793b40958c4bd49f9d4
with:
distrib: community
install_dir: ./cached_gnat
- name: Clean up GNAT
# TODO: For unknown reasons, even with all caches disabled, there are
# sometimes spurious installs of dependencies (gnatcoll-iconv, -gmp and
# langkit_support) in cached_gnat's install. Try to uninstall them to
# workaround this issue. We need to uninstall gpr and gnatcoll anyway,
# as we want their latest versions.
run: |
sh langkit/.github/helpers/clean_up_gnat.sh
- name: Fetch & install dependencies
env:
AWS_ACCESS_KEY_ID: ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.GHA_CACHE_SECRET}}
AWS_DEFAULT_REGION: eu-west-1
run: |
FILE=libadalang-Linux-master.tar.gz
aws s3 cp s3://adacore-gha-tray-eu-west-1/libadalang/$FILE . --sse=AES256
mkdir -p $PREFIX
tar xzf $FILE -C $PREFIX
rm -f -v $FILE
- name: Build Langkit
run: |
langkit/manage.py make --no-langkit-support
- name: Build LKQL
run: |
eval `lkql/manage.py setenv`
GPR_ARGS=-XLIBRARY_TYPE=relocatable make
- name: Test LKQL
run: |
eval `lkql/manage.py setenv`
make test
- name: Deploy
if: ${{github.repository != 'AdaCore/langkit-query-language'}}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./user_manual/build/html
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'