-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github actions for basic testing
Add basic tests to ensure E.L.B.E. is building and can be installed: - Build Debian Stable packages - Build Debian Unstable packages - Build Ubuntu packages and install all packages Signed-off-by: Benedikt Spranger <[email protected]>
- Loading branch information
Showing
6 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#! /bin/bash | ||
|
||
ARCH="$(dpkg-architecture -q DEB_BUILD_ARCH)" | ||
DIST="$(. /etc/os-release; echo ${VERSION_CODENAME/*, /})" | ||
|
||
cd repo | ||
reprepro list "$DIST" | awk '{print "sudo apt-get install -y "$2}' | sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#! /bin/bash | ||
|
||
ARCH="$(dpkg-architecture -q DEB_BUILD_ARCH)" | ||
DIST="$(. /etc/os-release; echo ${VERSION_CODENAME/*, /})" | ||
|
||
mkdir repo | ||
cp -a .github/templates/reprepro/* repo | ||
cd repo | ||
|
||
find . -type f -exec sed -i -e "s/@ARCH@/${ARCH}/" -e "s/@DIST@/${DIST}/" {} \; | ||
|
||
reprepro --ignore=wrongdistribution include "$DIST" ../../*_${ARCH}.changes | ||
reprepro --ignore=wrongdistribution include "$DIST" ../contrib/*_${ARCH}.changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#! /bin/bash | ||
|
||
DIST="$(. /etc/os-release; echo ${VERSION_CODENAME/*, /})" | ||
|
||
echo "deb [trusted=yes] file://$(pwd)/repo ${DIST} main" \ | ||
> /etc/apt/sources.list.d/elbe.list | ||
|
||
apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Origin: elbe | ||
Label: elbe | ||
Codename: @DIST@ | ||
Architectures: source @ARCH@ | ||
Components: main | ||
Description: E.L.B.E. packages repository (unsafe) | ||
# SignWith: 8044921302364FBDC541F38971F7AE8C018CE6CB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
verbose | ||
ask-passphrase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: "E.L.B.E. test runner" | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull | ||
# request events but only for the master branch | ||
on: | ||
workflow_dispatch: {} | ||
push: | ||
branches: | ||
- master | ||
- 'devel/**' | ||
pull_request: | ||
branches: | ||
- master | ||
- 'devel/**' | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or | ||
# in parallel | ||
jobs: | ||
Build-for-stable: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build E.L.B.E. Debian stable packages | ||
uses: jtdor/[email protected] | ||
with: | ||
docker-image: debian:stable-slim | ||
artifacts-dir: stable | ||
|
||
- name: Retrieve results | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: stable | ||
path: | | ||
stable/ | ||
if-no-files-found: warn | ||
|
||
Build-for-unstable: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build E.L.B.E. Debian stable packages | ||
uses: jtdor/[email protected] | ||
with: | ||
docker-image: debian:unstable-slim | ||
artifacts-dir: unstable | ||
|
||
- name: Retrieve results | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: unstable | ||
path: | | ||
unstable/ | ||
if-no-files-found: warn | ||
|
||
Run-on-Ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install tools | ||
run: sudo apt-get install -y config-package-dev devscripts git-buildpackage lighttpd reprepro | ||
|
||
- name: Create build environment | ||
run: ARCH="$(dpkg-architecture -q DEB_BUILD_ARCH)" DIST="$(. /etc/os-release; echo ${VERSION_CODENAME/*, /})" git-pbuilder create | ||
|
||
- name: Build E.L.B.E. packages | ||
run: gbp buildpackage -nc --git-debian-branch="$(git branch --show-current)" --git-pbuilder --git-dist="$(. /etc/os-release; echo ${VERSION_CODENAME/*, /})" --git-arch="$(dpkg-architecture -q DEB_BUILD_ARCH)" | ||
|
||
- name: Build configuration package | ||
run: cd contrib/debathena-transform-lighttpd; ARCH="$(dpkg-architecture -q DEB_BUILD_ARCH)" DIST="$(. /etc/os-release; echo ${VERSION_CODENAME/*, /})" git-pbuilder -nc | ||
|
||
- name: Build Repo | ||
run: ./.github/scripts/setup_repo.sh | ||
|
||
- name: Retrieve results | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: repo | ||
path: | | ||
repo/ | ||
if-no-files-found: warn | ||
|
||
- name: Prepare to use Repo | ||
run: sudo ./.github/scripts/update_sources_list.sh | ||
|
||
- name: Install E.L.B.E. | ||
run: sudo apt-get install -y elbe | ||
|
||
- name: Show E.L.B.E. version | ||
run: elbe --version | ||
|
||
- name: Install all E.L.B.E. packages | ||
run: sudo ./.github/scripts/install_all.sh |