When testing multiple operating systems, the environment variable is overridden by the same previous OS, if the same.
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, ubuntu-latest]
include:
- os: macos-latest
TARGET: x86_64-apple-darwin
- os: ubuntu-latest
TARGET: armv7-unknown-linux-musleabihf
- os: ubuntu-latest
TARGET: x86_64-unknown-linux-musl
steps:
- name: Building ${{ matrix.TARGET }}
run: echo "${{ matrix.TARGET }}"
This results in:
Building x86_64-apple-darwin
Building x86_64-unknown-linux-musl
Building x86_64-unknown-linux-musl