-
Notifications
You must be signed in to change notification settings - Fork 12
111 lines (92 loc) · 3.28 KB
/
coverage.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
# Sugar Build System
# (c) Srevin Saju 2020. All rights reserved
# Licensed under MIT OSI License
# Continuous Integration to clone all the activities and then create a bundle
name: Sugar Bundle Pre-merge Deploy Test
on:
push:
branches:
- 'master'
pull_request:
branches:
- 'master'
jobs:
buildxo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt install python3-pip python3-setuptools python3-dev
python3 -m pip install --upgrade pip
python3 -m pip install empy
- name: Install sugarstore-gen
run: |
pip3 install .
- name: Checkout current repository
run: |
git clone https://github.com/${{ github.repository }} x
cd x
git fetch --all
git fetch origin ${{ github.ref }}
git checkout FETCH_HEAD
git diff master.. --name-only > diff_file
echo "received diff ++ "
cat diff_file
- name: Download sugar and install
run: |
sudo sed -i '/deb-src/s/^# //' /etc/apt/sources.list
for module in sugar{-datastore,-artwork,-toolkit,-toolkit-gtk3,}; do
git clone https://github.com/sugarlabs/$module.git
done
sudo apt update
for module in sugar{-datastore,-artwork,-toolkit-gtk3,}; do
sudo apt build-dep $module
done
sudo apt install python{,3}-six python3-empy
for module in sugar{-artwork,-toolkit-gtk3,-datastore,}; do
cd $module
./autogen.sh --with-python3 --prefix=/usr
make
sudo make install
cd ..
done
for module in sugar{-artwork,-toolkit-gtk3,-datastore,}; do
cd $module
./autogen.sh --with-python2 --prefix=/usr
make
sudo make install
cd ..
done
sudo mkdir -p /usr/lib/python3.6/dist-packages
sudo cp -r /usr/lib/python3.6/site-packages/sugar3 /usr/lib/python3.6/dist-packages/.
sudo cp -r /usr/lib/python3.6/site-packages/jarabe /usr/lib/python3.6/dist-packages/.
sudo cp -r /usr/lib/python3.6/site-packages/carquinyol /usr/lib/python3.6/dist-packages/.
echo 'Sugar Installed'
echo $(which sugar-activity)
- name: Test Sugar
run: |
echo $PYTHONPATH
echo $PATH
python3 -c "import sugar3"
- name: Clone the new activity
run: |
mkdir activities
cd activities
git clone https://github.com/sugarlabs/Pippy
git clone https://github.com/sugarlabs/GSoC
git clone https://github.com/sugarlabs/pointillism
cd ..
- name: Get tools
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
export PATH=$PATH:$SUGAR_PATH:/home/runner/.local/bin
echo "clone static"
pip3 install coverage
ls activities
echo "checking if the activity is visible"
python3 -m aslo4 -i $(realpath ./activities) -l
echo "building bundle and regenerating appstore"
/home/runner/.local/bin/coverage run -m aslo4 -i $(realpath ./activities) -lbguyfsC -p ./aslo4-static -x https://sugarstore.netlify.app
bash <(curl -s https://codecov.io/bash)