Skip to content
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

For 1.4.1 #275

Merged
merged 10 commits into from
Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 171 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
name: Build packages

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master, maint-1.4 ]
pull_request:
branches: [ master, maint-1.4 ]
release:
types: [ published ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
make-rhel-pkg:
name: Make RHEL package
runs-on: ubuntu-latest
container: centos:latest
steps:
- name: Prepare
run: |
yum update -y
yum install -y make rpmdevtools yum-utils

- name: Clone repo
uses: actions/checkout@v2

- name: Make package
run: |
yum-builddep --assumeyes packaging/rpm/*.spec
make -C packaging/rpm pkg-local "DESTDIR=${GITHUB_WORKSPACE}/pkgs/"

- name: Publish package
uses: actions/upload-artifact@v1.0.0
with:
name: rhel-pkg
path: pkgs

make-alpine-pkg:
name: Make Alpine package
runs-on: ubuntu-latest
container: alpine:latest
steps:
- name: Prepare
run: |
apk update
apk upgrade
apk add make
apk add alpine-sdk
apk add go
adduser -G abuild -D jobber

- name: Clone repo
uses: actions/checkout@v2

- name: Make package
run: |
chmod a+w . packaging/alpine
sudo -u jobber make -C packaging/alpine pkg-local "DESTDIR=${GITHUB_WORKSPACE}/pkgs/"

- name: Publish package
uses: actions/upload-artifact@v1.0.0
with:
name: alpine-pkg
path: pkgs

make-debian-pkg:
name: Make Debian package
runs-on: ubuntu-latest
steps:
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y dpkg-dev debhelper dh-systemd

- name: Clone repo
uses: actions/checkout@v2

- name: Build package
run: make -C "${GITHUB_WORKSPACE}/packaging/debian" pkg-local "DESTDIR=${GITHUB_WORKSPACE}/pkgs/"

- name: Publish package
uses: actions/upload-artifact@v1.0.0
with:
name: debian-pkg
path: pkgs

test-on-macos:
name: Test on macOS
runs-on: macos-latest
steps:
- name: Prepare
run: |
python --version
brew install socat
sudo pip install robotframework
sudo sysadminctl -addUser normuser -home /Users/normuser
sudo createhomedir -c

- name: Clone repo
uses: actions/checkout@v2

- name: Install Jobber
run: |
make check build
sudo make install DESTDIR=/
PLIST=packaging/darwin/launchd.plist
sudo chown root:admin "${PLIST}"
sudo launchctl load "${PLIST}"
sudo launchctl start info.nekonya.jobber

- name: Test
run: |
if sudo robot --include test --pythonpath platform_tests/keywords platform_tests/suites; then
echo "::set-env name=PASSED_TESTS::true"
else
echo "::set-env name=PASSED_TESTS::false"
fi
mkdir test-report
mv *.html test-report/

- name: Publish test report
uses: actions/upload-artifact@v1.0.0
with:
name: mac-test-report
path: test-report

- name: SucceedOrFail
run: test "${PASSED_TESTS}" = true

test-on-debian:
name: Test on Debian
needs: make-debian-pkg
runs-on: ubuntu-latest
steps:
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install -y python-pip socat
sudo pip install robotframework
sudo useradd normuser -m

- name: Download package
uses: actions/download-artifact@v1
with:
name: debian-pkg

- name: Install package
run: sudo dpkg -i "$(find ${GITHUB_WORKSPACE} -name *.deb)"

- name: Clone repo
uses: actions/checkout@v2

- name: Test package
run: |
if sudo robot --include test --pythonpath platform_tests/keywords platform_tests/suites; then
echo "::set-env name=PASSED_TESTS::true"
else
echo "::set-env name=PASSED_TESTS::false"
fi
mkdir test-report
mv *.html test-report/

- name: Publish test report
uses: actions/upload-artifact@v1.0.0
with:
name: debian-test-report
path: test-report

- name: SucceedOrFail
run: test "${PASSED_TESTS}" = true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
bin
buildtools/gen
buildtools/gotools/tools-gopls-v0.3.4
*.rpm
*.tar
*.tgz
Expand Down
88 changes: 0 additions & 88 deletions Gopkg.lock

This file was deleted.

50 changes: 0 additions & 50 deletions Gopkg.toml

This file was deleted.

Loading