Skip to content

Commit

Permalink
Updated CI to added Ubuntu 24.04.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdulcet committed Apr 26, 2024
1 parent 442dda1 commit 7492cf4
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 13 deletions.
29 changes: 26 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand All @@ -25,16 +25,39 @@ jobs:
bash -e -o pipefail -- typeinfo.sh
CXX=clang++ bash -e -o pipefail -- typeinfo.sh
- name: ShellCheck
run: bash -c 'shopt -s globstar; shellcheck -o avoid-nullary-conditions,check-extra-masked-returns,check-set-e-suppressed,deprecate-which,quote-safe-variables,require-double-brackets -s bash **/*.sh'
run: shopt -s globstar; shellcheck -o avoid-nullary-conditions,check-extra-masked-returns,check-set-e-suppressed,deprecate-which,quote-safe-variables,require-double-brackets -s bash **/*.sh
continue-on-error: true

Linux-Container:
name: Linux Container

runs-on: ubuntu-latest
container: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu:14.04", "ubuntu:16.04", "ubuntu:18.04", "ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install
run: |
sudo apt-get update
sudo apt-get install -y clang
- name: Script
run: |
set -x
bash -o pipefail -- info.sh
bash -e -o pipefail -- ipinfo.sh
bash -e -o pipefail -- typeinfo.sh
CXX=clang++ bash -e -o pipefail -- typeinfo.sh
macOS:
name: macOS Datatype Information

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-14]
os: [macos-13, macos-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Simple script to quickly output system information on Linux, including:

RAM, swap and disk space is output in both MiB (1024<sup>2</sup> bytes) and MB (1000<sup>2</sup> bytes). Similar to the [`systeminfo`](https://en.wikipedia.org/wiki/Systeminfo.exe) command on Windows.

Requires Bash 4+. Compared to similar programs, this script outputs much more information and is smaller. Useful when using an unfamiliar system or VM, particularly before running a program that has specific system requirements. All the values are saved to variables, which makes this easy to [incorporate](#scripts-where-this-is-incorporated) into larger scripts.
Requires at least Bash 4+. Compared to similar programs, this script outputs much more information and is smaller. Useful when using an unfamiliar system or VM, particularly before running a program that has specific system requirements. All the values are saved to variables, which makes this easy to [incorporate](#scripts-where-this-is-incorporated) into larger scripts.

For your Public IP addresses, please see [Public IP addresses](#public-ip-addresses) below.

Expand Down Expand Up @@ -84,7 +84,7 @@ curl https://raw.github.com/tdulcet/Linux-System-Information/master/info.sh | ba

### Datatype Information

Outputs C/C++ datatype information, including datatype sizes, minimum values, maximum values, etc. for the current system. Requires C++17.
Outputs C/C++ datatype information, including datatype sizes, minimum values, maximum values, etc. for the current system. Requires C++11. Supports both Linux and macOS.

```bash
wget https://raw.github.com/tdulcet/Linux-System-Information/master/typeinfo.sh -qO - | bash -s
Expand Down
8 changes: 4 additions & 4 deletions ipinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ fi
urls=(
alma.ch/myip.cgi
api.ipify.org/
bot.whatismyipaddress.com/
# bot.whatismyipaddress.com/
canhazip.com/
checkip.amazonaws.com/
curlmyip.net/
diagnostic.opendns.com/myip
# diagnostic.opendns.com/myip
echoip.de/
eth0.me/
icanhazip.com/
Expand All @@ -33,8 +33,8 @@ urls=(
ipinfo.io/ip
ip.tyk.nu/
l2.io/ip
myip.addr.space/
tnx.nl/ip
# myip.addr.space/
# tnx.nl/ip
wgetip.com/
ifconfig.io/ip
# gso.cs.pdx.edu/ip/
Expand Down
8 changes: 4 additions & 4 deletions typeinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ int main()
cout << "\n\n";
cout << "Data Type\t\tDecimal digits\tMaximum Decimal digits\tMantissa bits\tMaximum integer\n\n";
cout << "float:\t\t\t" << FLT_DIG << "\t\t" << FLT_DECIMAL_DIG << "\t\t\t" << FLT_MANT_DIG << "\t\t" << floattostring(maxint<float>()) << '\n';
cout << "double:\t\t\t" << DBL_DIG << "\t\t" << DBL_DECIMAL_DIG << "\t\t\t" << DBL_MANT_DIG << "\t\t" << floattostring(maxint<double>()) << '\n';
cout << "long double:\t\t" << LDBL_DIG << "\t\t" << LDBL_DECIMAL_DIG << "\t\t\t" << LDBL_MANT_DIG << "\t\t" << floattostring(maxint<long double>()) << '\n';
cout << "float:\t\t\t" << FLT_DIG << "\t\t" << /* FLT_DECIMAL_DIG */ numeric_limits<float>::max_digits10 << "\t\t\t" << FLT_MANT_DIG << "\t\t" << floattostring(maxint<float>()) << '\n';
cout << "double:\t\t\t" << DBL_DIG << "\t\t" << /* DBL_DECIMAL_DIG */ numeric_limits<double>::max_digits10 << "\t\t\t" << DBL_MANT_DIG << "\t\t" << floattostring(maxint<double>()) << '\n';
cout << "long double:\t\t" << LDBL_DIG << "\t\t" << /* LDBL_DECIMAL_DIG */ numeric_limits<long double>::max_digits10 << "\t\t\t" << LDBL_MANT_DIG << "\t\t" << floattostring(maxint<long double>()) << '\n';
cout << '\n';
return 0;
}
EOF

trap 'rm /tmp/types{.cpp,}' EXIT
"$CXX" -std=gnu++17 -Wall -g -O3 /tmp/types.cpp -o /tmp/types
"$CXX" -std=gnu++11 -Wall -g -O3 /tmp/types.cpp -o /tmp/types
/tmp/types

0 comments on commit 7492cf4

Please sign in to comment.