1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
name: Test
on:
pull_request:
push:
schedule:
# Run weekly on Sundays at 00:00 UTC
- cron: '0 0 * * 0'
jobs:
test-distro:
# Only run on scheduled cron jobs
if: github.event_name == 'schedule'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-22.04]
steps:
- name: Verify that we can install neurodebian from APT
run: |
set -ex
sudo apt-get install -y neurodebian
# but by default (fix it to not disable if was enabled?)
# it results in neurodebian not enabled, thus disabled:
test ! -f /etc/apt/sources.list.d/neurodebian.sources.list
# enable it via our tool
NEURODEBIAN_ENABLE=1 NEURODEBIAN_UPDATE=1 sudo nd-configurerepo
. /etc/lsb-release
grep "\s$DISTRIB_CODENAME\s" /etc/apt/sources.list.d/neurodebian.sources.list
# and update was ran which fetched listings
/bin/ls /var/lib/apt/lists/neuro*
# Verify that it is still present
# TODO: for some reason disables it again :-/ Need to get something going already, disabled for now
#NEURODEBIAN_ENABLE=1 NEURODEBIAN_VERBOSE=10 sudo apt-get install -y --reinstall neurodebian
test -f /etc/apt/sources.list.d/neurodebian.sources.list
# Verify that -dev installs nicely
sudo apt-get install -y neurodebian-dev
- name: Debug on failure
if: failure()
run: |
# -x leads to printout to stderr and logs do not interleave correctly...
set -ex
ls -lR /etc/apt || :
cat /etc/apt/sources.list.d/neurodebian.sources.list || :
cat /etc/os-release || :
ls -lR /etc/neurodebian || :
# Could happen if installation of neurodebian package kills APT repo
# so print policy
sudo apt-cache policy
# But could be that just update wasn't run?
sudo apt-get update
sudo apt-cache policy
test-oneliner:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-22.04]
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Test the ultimate one-liner setup for NeuroDebian repository
run: bash tools/neurodebian-ci-setup.sh
test-nd-configurerepo:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-22.04]
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '^3.10'
- name: Verify that we can install neurodebian using our tool
run: |
set -ex
# it results in neurodebian not enabled, thus disabled:
test ! -f /etc/apt/sources.list.d/neurodebian.sources.list
# enable NeuroDebian via our tool version in this repo
sudo tools/nd-configurerepo
. /etc/lsb-release
grep "\s$DISTRIB_CODENAME\s" /etc/apt/sources.list.d/neurodebian.sources.list
# and update was ran which fetched listings
/bin/ls /var/lib/apt/lists/neuro*
# Verify that it is still present
# TODO: for some reason disables it again :-/ Need to get something going already, disabled for now
#NEURODEBIAN_ENABLE=1 NEURODEBIAN_VERBOSE=10 sudo apt-get install -y --reinstall neurodebian
test -f /etc/apt/sources.list.d/neurodebian.sources.list
test-nd_freeze:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, ubuntu-22.04]
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: install neurodebian using our tool (tested above)
run: |
sudo tools/nd-configurerepo
- name: Test nd_freeze
run: bash tools/tests/test_nd_freeze
- name: Debug on failure
if: failure()
run: |
set -ex
ls -lR /etc/apt || :
cat /etc/apt/sources.list.d/neurodebian.sources.list || :
cat /etc/os-release || :
ls -lR /etc/neurodebian || :
# Could happen if installation of neurodebian package kills APT repo
# so print policy
sudo apt-cache policy
# But could be that just update wasn't run?
sudo apt-get update
sudo apt-cache policy
|