Shell #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cross-Platform Test | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# - os: macos-10.15 | |
# script: chmod +x ./unix.sh && ./unix.sh | |
# - os: macos-11 | |
# script: chmod +x ./unix.sh && ./unix.sh | |
# - os: macos-12 | |
# script: chmod +x ./unix.sh && ./unix.sh | |
# - os: windows-2016 | |
# script: powershell -ExecutionPolicy Bypass -File .\windows.ps1 | |
# - os: windows-2019 | |
# script: powershell -ExecutionPolicy Bypass -File .\windows.ps1 | |
# - os: windows-2022 | |
# script: powershell -ExecutionPolicy Bypass -File .\windows.ps1 | |
- os: ubuntu-18.04 | |
script: chmod +x ./unix.sh && ./unix.sh | |
- os: ubuntu-20.04 | |
script: chmod +x ./unix.sh && ./unix.sh | |
- os: ubuntu-latest | |
script: chmod +x ./unix.sh && ./unix.sh | |
- os: ubuntu-latest | |
distro: debian:10 | |
script: chmod +x ./unix.sh && ./unix.sh | |
- os: ubuntu-latest | |
distro: debian:11 | |
script: chmod +x ./unix.sh && ./unix.sh | |
- os: ubuntu-latest | |
distro: centos:7 | |
script: chmod +x ./unix.sh && ./unix.sh | |
- os: ubuntu-latest | |
distro: centos:8 | |
script: chmod +x ./unix.sh && ./unix.sh | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker container | |
if: matrix.distro | |
uses: addnab/docker-run-action@v2 | |
with: | |
image: ${{ matrix.distro }} | |
options: -v ${{ github.workspace }}:/workspace | |
run: | | |
cd /workspace | |
${{ matrix.script }} | |
- name: Run script on non-Docker environments | |
if: matrix.distro == '' | |
run: ${{ matrix.script }} |