amber-lang / amber

💎 Amber the programming language compiled to Bash
https://amber-lang.com
GNU General Public License v3.0
3.81k stars 81 forks source link

test amber for all bash versions #422

Open b1ek opened 2 weeks ago

b1ek commented 2 weeks ago

we should select a minimal supported version, and run all tests on all bash versions, after the minimal supported one. i think its reasonable to support every bash version after 4.0, as it supports hashmaps which we are likely to implement. it is also since 2009, which means it has broad support on most machines

i suggest we download all bash versions after 4.0 from the bash https server, and then execute tests bwrapped with each version, like this:

run_for_ver() {
    curl https://ftp.gnu.org/gnu/bash/$1.tar.gz
    tar xzf $1.tar.gz
    bwrap --bind $1/bin/bash:/usr/bin/bash cargo r -r
    rm -r $1
}

run_for_ver 4.0
run_for_ver 4.1
...
run_for_ver 5.3
Mte90 commented 2 weeks ago

Well it is something that is not very handy and fast... Maybe it is enough the last 4.x and the last 5.x.

Also can be useful a CI that can be turned on not always but just when it is time to do a new release.