News for hackers. Stuff that matters.
Re:Act: Run your GitHub Actions locally by Gigachad on Saturday November 26, 2022 @05:37AM (#33751565)
With actions you can run multiple tasks in parallel, restart failed portions without retrying the whole CI, run certain sections with conditions like which branch you are on (different tasks when commit to master vs feature branch)
Re:Act: Run your GitHub Actions locally by Arnavion on Saturday November 26, 2022 @05:39AM (#33751578)
>With actions you can run multiple tasks in parallel,

That is the "strategy" part of the workflow, not the "tasks" part. My comment was about the latter. ("and make your GH Actions run `make` in a script task.")

>restart failed portions without retrying the whole CI, run certain sections with conditions like which branch you are on (different tasks when commit to master vs feature branch)

So can a shell script.

Re:Act: Run your GitHub Actions locally by FooBarWidget on Saturday November 26, 2022 @09:05AM (#33752716)
> Running things in parallel is literally a single `&` character.

Yes now try waiting for all parallel tasks, and error out if at least one errors. And try separating their output so that they don't get interleaved into a big mess. And try by default hiding the outputs of commands that succeeded, only showing those that failed, except when the user explicitly asks for it.

Your "simple" shell script now suddenly isn't so simple anymore.

Re:Act: Run your GitHub Actions locally by cormacrelf on Saturday November 26, 2022 @09:41AM (#33753012)
That’s what GNU Parallel is for. Or Pueue, which gives you a GH-Actions-level feature set but it’s less likely to be installed on any particular machine. Pretty sure you could fetch a pueue binary at the start of an actions script and do everything that way.
Re:Act: Run your GitHub Actions locally by stabbles on Saturday November 26, 2022 @09:36AM (#33752977)
Using GNU make you can get very nice output sync:

    all: variant-1 variant-2
        @echo done with all
    
    variant-%:
        @echo starting $@
        @sleep 1
        @echo done $@
Use `make -j2 --output-sync=target`.
Re:Act: Run your GitHub Actions locally by notpushkin on Saturday November 26, 2022 @10:24AM (#33753370)

    brew install make
    gmake -j2 --output-sync=target
on macOS.
Re:Act: Run your GitHub Actions locally by Arnavion on Saturday November 26, 2022 @07:48PM (#33758778)
>Yes now try waiting for all parallel tasks,

`wait`

>and error out if at least one errors.

`wait` propagates the exit status of the waited task. `set -e` triggers the script to exit on any command failure.

>And try separating their output so that they don't get interleaved into a big mess.

`| while read -r line; do echo "task X: $line"; done`

Learn the tools instead of being so confident that it can't be done or that it's complicated.

Re:Act: Run your GitHub Actions locally by FooBarWidget on Sunday November 27, 2022 @12:48PM (#33764873)
You remind me of that guy who said there's no point in Dropbox because one can "just simply setup an sftp server".
Re:Act: Run your GitHub Actions locally by Gigachad on Saturday November 26, 2022 @05:10PM (#33757321)
What I mean is if you have 50,000 unit tests, writing an actual CI config will let you split that up in to 20 jobs that all run at once and if a test fails, you can retry that 1/20th of the tests instead of the whole thing.

The CI runners aren’t multi core VMs I believe so you can’t just use standard shell utilities, you have to indicate to the CI system you want to run multiple tasks.

Re:Act: Run your GitHub Actions locally by Arnavion on Saturday November 26, 2022 @06:17PM (#33757978)
Yes, that's the "strategy" part.