-
Notifications
You must be signed in to change notification settings - Fork 186
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
Refactor attempt while providing upstream downstream #262
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,67 @@ | ||
name: Bash | ||
|
||
# Relevant to events - https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows | ||
on: | ||
pull_request: | ||
types: [synchronize, opened, reopened, ready_for_review] | ||
paths: | ||
- '**.bash' | ||
- "tools/dockerfreeze" | ||
|
||
jobs: | ||
# Linting | ||
lint: | ||
runs-on: ubuntu-latest | ||
container: debian:stable | ||
steps: | ||
- name: Installing dependencies.. | ||
run: | | ||
# Sync repos | ||
# Check for git | ||
if ! apt list --installed 2>/dev/null | grep -qP "^git\/stable.*"; then | ||
# Check if we can install git | ||
if ! apt list | grep -qP "^git\/stable.*"; then | ||
apt update | ||
elif apt list | grep -qP "^git\/stable.*"; then | ||
true | ||
else | ||
exit 255 | ||
fi | ||
# Install git | ||
apt install -y git | ||
elif apt list --installed 2>/dev/null | grep -qP "^git\/stable.*"; then | ||
true | ||
else | ||
exit 255 | ||
fi | ||
# Check for shellcheck | ||
if ! apt list --installed 2>/dev/null | grep -qP "^shellcheck\s{1}-.*"; then | ||
# Check if we can install shellcheck | ||
if ! apt list | grep -qP "^shellcheck\s{1}-.*"; then | ||
apt update | ||
elif apt list | grep -qP "^shellcheck\s{1}-.*"; then | ||
true | ||
else | ||
exit 255 | ||
fi | ||
# Install shellcheck | ||
apt install -y shellcheck | ||
elif apt list --installed 2>/dev/null | grep -qP "^shellcheck\s{1}-.*"; then | ||
true | ||
else | ||
exit 255 | ||
fi | ||
- name: Pulling git dir.. | ||
uses: actions/checkout@v2 | ||
- name: Processing files.. | ||
# Make sure that bash is used | ||
shell: bash | ||
run: | | ||
cd "$GITHUB_WORKSPACE" | ||
|
||
# Process files | ||
## NOTICE: Do not use for loop to avoid pitfall https://mywiki.wooledge.org/BashPitfalls#pf1 | ||
git --git-dir="$GITHUB_WORKSPACE/.git" ls-files -z -- '*.bash' tools/dockerfreeze | while IFS= read -rd '' file; do | ||
printf 'linting bash file %s\n' "$file" | ||
shellcheck --external-sources --shell=bash "$file" | ||
done |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: bootstrap-test | ||
|
||
# Relevant to events - https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows | ||
on: | ||
pull_request: | ||
types: [synchronize, opened, reopened, ready_for_review] | ||
paths: | ||
- 'bootstrap.sh' | ||
|
||
jobs: | ||
# Linting | ||
lint: | ||
runs-on: ubuntu-latest | ||
container: debian:stable | ||
steps: | ||
- name: FIXME | ||
# Make sure that bash is used | ||
shell: bash | ||
run: | | ||
printf '%s\n' "FIXME" | ||
Comment on lines
+1
to
+20
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. Already included into travis, no need for this. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Exherbo | ||
|
||
# Relevant to events - https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows | ||
on: | ||
pull_request: | ||
types: [synchronize, opened, reopened, ready_for_review] | ||
paths: | ||
- 'dist/paludis/exherbo' | ||
|
||
jobs: | ||
# Linting | ||
lint: | ||
runs-on: ubuntu-latest | ||
container: exherbo:exherbo-x86_64-pc-linux-gnu-base | ||
steps: | ||
- name: FIXME | ||
# Make sure that bash is used | ||
shell: bash | ||
run: | | ||
printf '%s\n' "FIXME" | ||
Comment on lines
+1
to
+20
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. I don't want to downplay Exherbo - but before a CI for Exherbo is added, one might add Fedora or Arch first since they have a much bigger user and developer base, and thus are more representative if the CI would actually fail. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Shell | ||
|
||
# Relevant to events - https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows | ||
on: | ||
pull_request: | ||
types: [synchronize, opened, reopened, ready_for_review] | ||
paths: | ||
- '**.sh' | ||
|
||
jobs: | ||
# Linting | ||
lint: | ||
runs-on: ubuntu-latest | ||
container: debian:stable | ||
steps: | ||
- name: Installing dependencies.. | ||
run: | | ||
# Sync repos | ||
# Check for git | ||
if ! apt list --installed 2>/dev/null | grep -qP "^git\/stable.*"; then | ||
# Check if we can install git | ||
if ! apt list | grep -qP "^git\/stable.*"; then | ||
apt update | ||
elif apt list | grep -qP "^git\/stable.*"; then | ||
true | ||
else | ||
exit 255 | ||
fi | ||
# Install git | ||
apt install -y git | ||
elif apt list --installed 2>/dev/null | grep -qP "^git\/stable.*"; then | ||
true | ||
else | ||
exit 255 | ||
fi | ||
# Check for shellcheck | ||
if ! apt list --installed 2>/dev/null | grep -qP "^shellcheck\s{1}-.*"; then | ||
# Check if we can install shellcheck | ||
if ! apt list | grep -qP "^shellcheck\s{1}-.*"; then | ||
apt update | ||
elif apt list | grep -qP "^shellcheck\s{1}-.*"; then | ||
true | ||
else | ||
exit 255 | ||
fi | ||
# Install shellcheck | ||
apt install -y shellcheck | ||
elif apt list --installed 2>/dev/null | grep -qP "^shellcheck\s{1}-.*"; then | ||
true | ||
else | ||
exit 255 | ||
fi | ||
- name: Pulling git dir.. | ||
uses: actions/checkout@v2 | ||
- name: Processing files.. | ||
# Make sure that bash is used | ||
shell: bash | ||
run: | | ||
cd "$GITHUB_WORKSPACE" | ||
|
||
# Process files | ||
## NOTICE: Do not use for loop to avoid pitfall https://mywiki.wooledge.org/BashPitfalls#pf1 | ||
git --git-dir="$GITHUB_WORKSPACE/.git" ls-files -z -- '*.sh' | while IFS= read -rd '' file; do | ||
printf 'linting shell file %s\n' "$file" | ||
shellcheck --external-sources --shell=sh "$file" | ||
done | ||
Comment on lines
+1
to
+66
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. Besides a spellcheck being pretty much useless wasted computation time, this can be easily integrated into travis in like two lines. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
all: | ||
# FIXME: Add nice message | ||
@ exit 2 | ||
|
||
build: | ||
@ bootstrap.sh build | ||
|
||
exherbo-docker-test: | ||
@ sudo docker run \ | ||
--interactive \ | ||
--tty \ | ||
--volume "$$(pwd)/dist/paludis/exherbo:/var/repositories/gamemode" \ | ||
exherbo/exherbo-x86_64-pc-linux-gnu-base \ | ||
bash -c "true \ | ||
&& chown root:tty /dev/tty \ | ||
&& usermod -a -G tty paludisbuild \ | ||
&& printf '%s\n' \ | ||
\"format = e\" \ | ||
\"location = \"\$$\{root\}/var/db/paludis/repositories/gamemode\"\" \ | ||
\"sync = file:///var/repositories/gamemode\" \ | ||
> /etc/paludis/repositories/gamemode.conf \ | ||
&& cat /etc/paludis/repositories/gamemode.conf \ | ||
&& cave sync \ | ||
&& cave resolve games-utils/gamemode \ | ||
" | ||
Comment on lines
+1
to
+25
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. Adding a second build system (Make) just for a test that could be run in a script is a bad idea, it ruins automatic build systems like debhelper on Debian. |
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.
No need to run the spellcheck twice.