-
Notifications
You must be signed in to change notification settings - Fork 67
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
Try to install on many OS using Travis and docker. #61
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
# Runs a single command using the runners shell | ||
- name: Run a one-line script | ||
run: echo Hello, world! | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Run a multi-line script | ||
run: | | ||
echo Add other actions to build, | ||
echo test, and deploy your project. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,42 @@ | ||
dist: trusty | ||
sudo: required | ||
|
||
matrix: | ||
include: | ||
- os: linux | ||
- env: OS_TYPE=fedora | ||
- env: INSTALL_REQUIREMENTS="dnf repolist; dnf install -y perl shellcheck devscripts sudo wget" | ||
|
||
- os: linux | ||
- env: OS_TYPE=opensuse | ||
- env: INSTALL_REQUIREMENTS="zypper refresh; zypper in -y perl shellcheck devscripts sugo wget" | ||
|
||
- os: linux | ||
- env: OS_TYPE=dauchida/freebsd | ||
- env: INSTALL_REQUIREMENTS="pkg install -y perl shellcheck devscripts sudo wget" | ||
|
||
- os: linux | ||
- env: OS_TYPE=debian:11 | ||
- env: INSTALL_REQUIREMENTS="sudo apt-get update -qq; sudo apt-get upgrade -y; sudo apt-get install -y -qq perl shellcheck devscripts sudo wget" | ||
|
||
- os: linux | ||
- env: OS_TYPE=ubuntu:22.04 | ||
- env: INSTALL_REQUIREMENTS="sudo apt-get update -qq; sudo apt-get upgrade -y; sudo apt-get install -y -qq perl shellcheck devscripts sudo wget" | ||
|
||
- os: osx | ||
- env: OS_TYPE=osx | ||
- env: INSTALL_REQUIREMENTS="brew update; brew install perl shellcheck devscripts sudo wget" | ||
|
||
before_install: | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -qq perl shellcheck devscripts | ||
script: prove | ||
- [[ $TRAVIS_OS_NAME == "linux" ]] && docker pull ${OS_TYPE} | ||
|
||
install: | ||
- [[ $TRAVIS_OS_NAME == "osx" ]] && docker run -d $OS /bin/sh -c "$INSTALL_REQUIREMENTS" | ||
- [[ $TRAVIS_OS_NAME == "linux" ]] && docker run -d $OS /bin/sh -c "$INSTALL_REQUIREMENTS" | ||
- docker run -d $OS /bin/sh -c "sudo wget https://github.com/EspaceNetworks/virtualmin-install/raw/master/virtualmin-install.sh" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should not hard code to your repository. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. Have to look up the runtime variable in travis for "the URL to a file in the current checked out source we're running this test on" so that it'd work right from everywhere. |
||
- docker run -d $OS /bin/sh -c "sudo chmod +x virtualmin-install.sh" | ||
|
||
script: | ||
# Test for osx and run different build or prep commands: | ||
- [[ $TRAVIS_OS_NAME == "osx" ]] && docker run -d $OS /bin/sh -c "prove" && docker run -d $OS /bin/sh -c "./virtualmin-install.sh" | ||
- [[ $TRAVIS_OS_NAME == "linux" ]] && docker run -d $OS /bin/sh -c "prove"&& docker run -d $OS /bin/sh -c "./virtualmin-install.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which value will be set for
$OS
variable?If it is a linux distribution name (such as
ubuntu:22.04
), we don't need to run onosx
env, which cost more credits than usual.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, there is absolutely 100% no way I'm ever going to support MacOS. I spent weeks messing about with it several years ago, and it's not worth it (and the days of MacOS on a server are over, if they ever existed...they didn't really, but Apple did used to make servers). Besides that, the best "package manager" on MacOS is allegedly Homebrew, which is a disaster, especially for servers.