-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from dshearer/for-1.4.1
Merging GH actions and use of Go modules.
- Loading branch information
Showing
210 changed files
with
3,560 additions
and
33,326 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,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 |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
bin | ||
buildtools/gen | ||
buildtools/gotools/tools-gopls-v0.3.4 | ||
*.rpm | ||
*.tar | ||
*.tgz | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.