Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 48 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,34 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

build:
name: Build
name: Build (${{ matrix.name }})
needs: setup_release
permissions:
contents: read
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }}
shell: ${{ matrix.shell }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
include:
- name: Linux
os: ubuntu-latest
shell: bash
- name: macOS
os: macos-latest
shell: bash
- name: Windows-AMD64
os: windows-latest
shell: msys2 {0}
msystem: ucrt64
toolchain: ucrt-x86_64
- name: Windows-ARM64
os: windows-11-arm
shell: msys2 {0}
msystem: clangarm64
toolchain: clang-aarch64
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -84,18 +97,17 @@ jobs:
if: runner.os == 'Windows'
uses: msys2/setup-msys2@cafece8e6baf9247cf9b1bf95097b0b983cc558d # v2.31.0
with:
msystem: ucrt64
msystem: ${{ matrix.msystem }}
update: true
install: >-
doxygen
mingw-w64-ucrt-x86_64-binutils
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-graphviz
mingw-w64-ucrt-x86_64-ninja
mingw-w64-ucrt-x86_64-nodejs
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-boost
mingw-w64-ucrt-x86_64-nlohmann-json
mingw-w64-${{ matrix.toolchain }}-boost
mingw-w64-${{ matrix.toolchain }}-cmake
mingw-w64-${{ matrix.toolchain }}-graphviz
mingw-w64-${{ matrix.toolchain }}-ninja
mingw-w64-${{ matrix.toolchain }}-nodejs
mingw-w64-${{ matrix.toolchain }}-toolchain
mingw-w64-${{ matrix.toolchain }}-nlohmann-json

- name: Setup python
id: setup-python
Expand Down Expand Up @@ -172,7 +184,7 @@ jobs:
(steps.test_report.outcome == 'success')
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: coverage-${{ matrix.os }}
name: coverage-${{ matrix.name }}
path: |
build/coverage.xml
build/tests/test_results.xml
Expand All @@ -181,7 +193,7 @@ jobs:
- name: Move Artifacts
run: |
mkdir -p artifacts
if ["${RUNNER_OS}" == "Windows"]; then
if [[ "${RUNNER_OS}" == "Windows" ]]; then
mv -f ./build/tests/test_libdisplaydevice.exe artifacts/
else
mv -f ./build/tests/test_libdisplaydevice artifacts/
Expand All @@ -190,7 +202,7 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: build-${{ runner.os }}
name: build-${{ matrix.name }}
path: artifacts/
if-no-files-found: error

Expand All @@ -208,20 +220,22 @@ jobs:
fail-fast: false
matrix:
include:
- build_os: ubuntu-latest
- build_name: Linux
flag: Linux
- build_os: macos-latest
- build_name: macOS
flag: macOS
- build_os: windows-latest
flag: Windows
- build_name: Windows-AMD64
flag: Windows-AMD64
- build_name: Windows-ARM64
flag: Windows-ARM64
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Download coverage artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: coverage-${{ matrix.build_os }}
name: coverage-${{ matrix.build_name }}
path: _coverage

- name: Debug coverage file
Expand Down Expand Up @@ -263,11 +277,17 @@ jobs:
contents: read
runs-on: ubuntu-latest
steps:
- name: Download build artifact (Windows)
- name: Download build artifact (Windows-AMD64)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-Windows-AMD64
path: build-Windows-AMD64

- name: Download build artifact (Windows-ARM64)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-Windows
path: build-Windows
name: build-Windows-ARM64
path: build-Windows-ARM64

- name: Download build artifact (Linux)
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
Expand All @@ -284,7 +304,8 @@ jobs:
- name: Move artifacts
run: |
mkdir -p artifacts
mv -f build-Windows/test_libdisplaydevice.exe artifacts/test_libdisplaydevice-Windows.exe
mv -f build-Windows-AMD64/test_libdisplaydevice.exe artifacts/test_libdisplaydevice-Windows-AMD64.exe
mv -f build-Windows-ARM64/test_libdisplaydevice.exe artifacts/test_libdisplaydevice-Windows-ARM64.exe
mv -f build-Linux/test_libdisplaydevice artifacts/test_libdisplaydevice-Linux
mv -f build-macOS/test_libdisplaydevice artifacts/test_libdisplaydevice-macOS

Expand Down
Loading