Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
View runs Go to file
 
 
Cannot retrieve contributors at this time
# 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:
pull_request:
branches:
- 'master'
paths:
- 'bundles/**'
jobs:
buildxo:
runs-on: ubuntu-latest
steps:
- name: Announce
uses: thollander/actions-comment-pull-request@master
with:
message: |
Hello! :wave: Thanks for adding this activity.
You will be mentioned if the build completes successfully.
*Only builds that complete successfully will be merged.*
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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: 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
for i in $(cat ../x/$(cat ../x/diff_file)); do
git clone $i
done
cd ..
- name: Get tools
run: |
export PATH=$PATH:$SUGAR_PATH
echo "clone static"
git clone https://github.com/sugarlabs-appstore/aslo-v4.git
cd aslo-v4
echo "checking out oop-ss"
python3 -m pip install -r requirements.txt
ls ../activities
echo "checking if the activity is visible"
python3 -m aslo4 -i $(realpath ../activities) -l
echo "building bundle and regenerating appstore"
python3 -m aslo4 -i $(realpath ../activities) -b -g -p ./aslo4-static -Pvfsbguyz
echo "Compressing and preparing for upload"
tar -czvf aslo4-activity.tar.gz ./aslo4-compiled
cd ..
- uses: actions/upload-artifact@v2
with:
name: bundle-xo.xo
path: aslo-v4/aslo4-compiled/bundles/**
- uses: actions/upload-artifact@v2
with:
name: aslo4-activity.tar.gz
path: sugarappstore/aslo4-activity.tar.gz
- name: Comment PR
uses: thollander/actions-comment-pull-request@master
with:
message: |
@${{ github.actor }}! :tada:
Build succeeded!
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}