gitlab-ci: split linux and macos shared before scripts

They're not actually the same anyways and the anchors can't be shared
between the files. We can figure out refactoring in the future.
4 files changed