Skip to content

Commit

Permalink
Merge pull request #275 from dshearer/for-1.4.1
Browse files Browse the repository at this point in the history
Merging GH actions and use of Go modules.
  • Loading branch information
dshearer authored Mar 30, 2020
2 parents cb6d6b6 + d1c9d6c commit 8135b54
Show file tree
Hide file tree
Showing 210 changed files with 3,560 additions and 33,326 deletions.
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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/[email protected]
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

0 comments on commit 8135b54

Please sign in to comment.