Skip to content

Commit

Permalink
First test
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrxyz committed Dec 11, 2024
1 parent 73e3b77 commit 61d7261
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,32 @@ jobs:
- id: check_skip
uses: fkirc/skip-duplicate-actions@v5

ubuntu-22-test:
name: Ensure Ubuntu 22 is prohibited
runs-on: ubuntu-22.04
needs: avoid-duplicate-ci
if: needs.avoid-duplicate-ci.outputs.should_skip != 'true'
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Ensure install script fails
run: |
cd $GITHUB_WORKSPACE
./scripts/install.sh && exit 1 || exit 0
ubuntu-24-test:
name: Ensure Ubuntu 24 is prohibited
runs-on: ubuntu-24.04
needs: avoid-duplicate-ci
if: needs.avoid-duplicate-ci.outputs.should_skip != 'true'
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4
- name: Ensure install script fails
run: |
cd $GITHUB_WORKSPACE
./scripts/install.sh && exit 1 || exit 0
super-ci:
name: Run tests and build docs
needs: avoid-duplicate-ci
Expand Down
16 changes: 16 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,22 @@ if [[ -z ${TERM} ]]; then
clear
fi

# Before even starting, check if using Ubuntu 20.04
NAME=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
VERSION=$(awk -F= '/^VERSION/{print $2}' /etc/os-release)
if [[ $NAME != *"Ubuntu"* ]]; then
printf "${Red}This script is only supported on Ubuntu (you're using: ${NAME}). Please install Ubuntu 20.04.${Res}\n"
exit 1
fi
if [[ $VERSION != *"20.04"* ]]; then
printf "${Red}This script is only supported on Ubuntu 20.04 (you're using: ${VERSION}). Please install Ubuntu 20.04.${Res}\n"
exit 1
fi
if [[ $(grep -i Microsoft /proc/version) ]]; then
printf "${Red}Using WSL is not supported, due to graphical issues with our simulation environment. Please dual-boot your computer, or use a virtual machine.${Res}\n"
exit 1
fi

# Display header
cat <<EOF
$(color "$Pur")
Expand Down

0 comments on commit 61d7261

Please sign in to comment.