-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Tribler by using GitHub Actions #6903
Conversation
26789c9
to
8124ebc
Compare
For the history (manual approve for upload): name: Binaries
on:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ '3.8' ]
os: [ ubuntu-22.04 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{github.event.pull_request.head.sha}}
- name: Cache package
id: cache
uses: actions/cache@v3
with:
path: cache
key: ubuntu-cache
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Pip dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./requirements-build.txt
- name: Install Ubuntu dependencies
run: |
sudo apt-get update
sudo apt-get -y install debhelper devscripts
# for qt:
sudo apt-get -y install libxcb-xinerama0-dev libqt5x11extras5
- name: Save Git info
run: |
git describe --tags HEAD > .TriblerVersion
echo ${{ github.event.pull_request.head.ref }} > .TriblerBranch
echo ${{ github.event.pull_request.head.sha }} > .TriblerCommit
- name: Run build script
timeout-minutes: 5
env:
SENTRY_URL: ${{secrets.SENTRY_URL}}
QT_QPA_PLATFORM: offscreen
QT_ACCESSIBILITY: 1
QT_IM_MODULE: ibus
run: |
./build/debian/makedist_debian.sh
- name: Move binaries to cache
run: |
mkdir -p cache
mv tribler.deb ./cache
upload:
runs-on: ubuntu-latest
needs: [ build ]
environment:
name: Upload
steps:
- name: Cache package
id: cache
uses: actions/cache@v3
with:
key: ubuntu-cache
path: cache
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: tribler.deb
path: cache/tribler.deb
retention-days: 1 |
2d71ec6
to
24c0284
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvements 👍
A concern is how it affects the Flatpak build and push to Flathub, that needs to be checked before merging.
https://flathub.org/apps/details/org.tribler.Tribler
These commands are added to Ubuntu |
@xoriole I don't see any mentions of Flatpak in our repo. Could you please give me a link to the Flatpak build? |
Flatpak build is community contributed and is present here: Revisiting the config file, the Flatpak package is built using Debian package from the GitHub release URL. Therefore, this PR would not have any effect on that. So, my original concern regarding Flatpak build is invalid. |
This PR adds the
build.yml
workflow for ubuntu that runs on each PR.Also, it performs the first step of
update_version_from_git.py
refactoring: extractingupdate_version.py
andupdate_metadata.py
.When I add a build workflow for each OS,
update_version_from_git.py
could be deleted.This change is backwards-compatible with Jenkins one-click-release, but we must add the following lines to Jenkins before the call
makedist_debian.sh
: