-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
115 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,115 @@ | ||
# Copyright 2020 Rainer Gerhards and Others | ||
# | ||
# https://github.com/rsyslog/rsyslog-pkg-ubuntu | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# References: | ||
# | ||
# https://help.github.com/en/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#github-actions-notification-options | ||
# https://github.com/settings/notifications | ||
# https://software.opensuse.org//download.html?project=home%3Argerhards&package=rsyslog | ||
|
||
--- | ||
name: CI PR runner | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
# Default: 360 minutes | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: git checkout packging project | ||
uses: actions/checkout@v1 | ||
|
||
- name: install base components | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | ||
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | ||
sudo apt-get update | ||
sudo apt-get install docker-ce docker-ce-cli containerd.io | ||
sudo systemctl enable docker | ||
sudo systemctl start docker | ||
#sudo apt-get update | ||
#sudo apt-get install -y docker docker.io | ||
#sudo systemctl enable docker.service | ||
#sudo systemctl start docker.service | ||
#- name: do a test run | ||
#run: | | ||
#sudo docker run --rm ubuntu:18.04 echo test | ||
- name: prep env | ||
run: | | ||
#mkdir $GITHUB_WORKSPACE/host | ||
docker pull rsyslog/rsyslog_obs:basic | ||
docker run --rm --privileged -e PKG_PROJ -v/buildbot/pkg:$GITHUB_WORKSPACE/host -v$(pwd):/work rsyslog/rsyslog_obs:basic \ | ||
bash -c " | ||
export PKG_PROJ=../../.. | ||
mkdir _OBS | ||
cd _OBS | ||
echo pre clone | ||
git clone https://github.com/rsyslog/pkg_obs-clone.git | ||
echo post clone | ||
cd pkg_obs-clone/rsyslog | ||
ls -l | ||
osc repairwc . | ||
source ./build-ubuntu.sh | ||
" | ||
- name: build Ubuntu 20.04 (focal) | ||
run: | | ||
docker run --rm --privileged -e PKG_PROJ -v$GITHUB_WORKSPACE/host:/host -v$(pwd):/work rsyslog/rsyslog_obs:basic \ | ||
bash -c " | ||
export PKG_PROJ=../../.. | ||
cd _OBS/pkg_obs-clone/rsyslog | ||
osc build --trust-all-projects --local-package xUbuntu_20.04 x86_64 | ||
" | ||
- name: build Ubuntu 18.04 (bionic) | ||
run: | | ||
docker run --rm --privileged -e PKG_PROJ -v/buildbot/pkg:$GITHUB_WORKSPACE/host -v$(pwd):/work rsyslog/rsyslog_obs:basic \ | ||
bash -c " | ||
export PKG_PROJ=../../.. | ||
ls -l $PKG_PROJ | ||
cd _OBS/pkg_obs-clone/rsyslog | ||
#osc build --trust-all-projects --local-package xUbuntu_18.04 x86_64 | ||
" | ||
- name: build Ubuntu 16.04 (xenial) | ||
run: | | ||
docker run --rm --privileged -e PKG_PROJ -v/buildbot/pkg:$GITHUB_WORKSPACE/host -v$(pwd):/work rsyslog/rsyslog_obs:basic \ | ||
bash -c " | ||
export PKG_PROJ=../../.. | ||
cd _OBS/pkg_obs-clone/rsyslog | ||
#osc build --trust-all-projects --local-package xUbuntu_16.04 x86_64 | ||
" | ||
- name: build Ubuntu 14.04 (trusty) | ||
run: | | ||
docker run --rm --privileged -e PKG_PROJ -v/buildbot/pkg:$GITHUB_WORKSPACE/host -v$(pwd):/work rsyslog/rsyslog_obs:basic \ | ||
bash -c " | ||
export PKG_PROJ=../../.. | ||
cd _OBS/pkg_obs-clone/rsyslog | ||
#osc build --trust-all-projects --local-package xUbuntu_14.04 x86_64 | ||
" | ||
- name: post build | ||
run: | | ||
sudo chown -R -R $(id -u):$(id -g) . | ||
sudo find $GITHUB_WORKSPACE -name host | ||
sudo find $GITHUB_WORKSPACE/host -exec ls -l {} \; |