mill icon indicating copy to clipboard operation
mill copied to clipboard

CI: Add macosx to the matrix

Open lefou opened this issue 2 years ago • 9 comments

lefou avatar Jan 31 '22 10:01 lefou

Bah, GH, you're drunk.

lefou avatar Feb 03 '22 08:02 lefou

In a private repo I use

jobs:
  release:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: windows-latest
            artifactName: windows
          - os: macos-latest
            artifactName: macos
    steps:
    ...

macos-latest should work :)

james-s-w-clark avatar Jun 10 '22 08:06 james-s-w-clark

The filename for this action is actions.yml. I'd suggest buildAndRelease.yml (as per the name at the top of the file), because you might add more actions later.

james-s-w-clark avatar Jun 10 '22 08:06 james-s-w-clark

In a private repo I use

jobs:
  release:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: windows-latest
            artifactName: windows
          - os: macos-latest
            artifactName: macos
    steps:
    ...

macos-latest should work :)

Already tried that, didn't work.

lefou avatar Jun 10 '22 09:06 lefou

Already tried that, didn't work.

I think it's possible that even though the action has

on:
  push:
  pull_request:

it is actually running the action.yml file that is on main (which does not yet have this change, thus macos-latest won't run). My notes say:

doesn’t feel like autoupdate is working with it just on PR on my own personal private repo GOT IT INTO MAIN, THEN IT SEEMS TO WORK I will get PR merged and go from there...

I think I'm wrong here though. Your PR to test java 16/17 runs Actions against those Java versions...

james-s-w-clark avatar Jun 10 '22 10:06 james-s-w-clark

I'm pretty sure it's using the changed actions.yml. But it fails for the complete test job matrix. None is run, not even those with ubuntu-latest. They even don't appear in the jobs list.

lefou avatar Jun 10 '22 10:06 lefou

Yeah, I tried putting it to main on a fork and then doing a PR - and it isn't in the jobs list (link).

I double checked my private repo GH Action works with macos-latest. It's OK: image

Also trying act to test locally, but it doesn't properly support macos runners. I will have a play in the fork and let you know if I get an update.

james-s-w-clark avatar Jun 10 '22 10:06 james-s-w-clark

@IdiosApps I guess I found the issue. I have some explicitly included jobs. Turns out, I also need to explicitly specify a value for matrix.os for these jobs. Now, GHA starts all jobs.

lefou avatar Jun 10 '22 11:06 lefou

@IdiosApps I guess I found the issue. I have some explicitly included jobs. Turns out, I also need to explicitly specify a value for matrix.os for these jobs. Now, GHA starts all jobs.

Nice one! I just found out it's the includes section too - tore it down to barebones and added stuff back bit-by-bit.

james-s-w-clark avatar Jun 10 '22 11:06 james-s-w-clark