-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
616005e
commit 9240506
Showing
1 changed file
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: Hexwave CI | ||
on: | ||
push: | ||
paths: | ||
- '**.cpp' | ||
- '**.h' | ||
- '**.hpp' | ||
- '**.cmake' | ||
- '**ci.yml' | ||
- '**CMakeLists.txt' | ||
pull_request: | ||
paths: | ||
- '**.cpp' | ||
- '**.h' | ||
- '**.hpp' | ||
- '**.cmake' | ||
- '**ci.yml' | ||
- '**CMakeLists.txt' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
linux: | ||
permissions: | ||
contents: write | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.cfg.arch }}-(${{ matrix.cfg.cpp-version }}) | ||
cancel-in-progress: true | ||
name: Linux ${{matrix.cfg.arch}} (${{matrix.cfg.cpp-version}}) | ||
runs-on: ${{matrix.cfg.os}} | ||
strategy: | ||
fail-fast: false # Don't fail everything if one fails. We want to test each OS/Compiler individually | ||
matrix: | ||
cfg: | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-20.04, package: clang-10, cpp-version: clang++-10 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-11, cpp-version: clang++-11 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-12, cpp-version: clang++-12 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-13, cpp-version: clang++-13 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-14, cpp-version: clang++-14 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-15, cpp-version: clang++-15 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: g++-12, cpp-version: g++-12 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: g++-11, cpp-version: g++-11 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: g++-10, cpp-version: g++-10 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-20.04, package: g++-9, cpp-version: g++-9 } | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-20.04, package: g++-8, cpp-version: g++-8 } | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout Hexwave | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Install apt packages | ||
run: sudo sed -i 's/azure\.//' /etc/apt/sources.list && sudo apt update && sudo apt install -y ${{ matrix.cfg.package }} ffmpeg pkg-config libavcodec-dev libavformat-dev libswscale-dev xorg-dev | ||
|
||
- name: Generate CMake | ||
run: cmake -B build | ||
env: | ||
CXX: ${{matrix.cfg.cpp-version}} | ||
|
||
- name: Build Project | ||
run: cmake --build build -j${{ matrix.cfg.concurrency }} | ||
|
||
steam-deck: # NOTE: This actually isn't a steam deck, but rather a linux machine mimicing the exact ffmpeg version on Steam Deck. | ||
permissions: | ||
contents: write | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.cfg.arch }}-(${{ matrix.cfg.cpp-version }}) | ||
cancel-in-progress: true | ||
name: Linux ${{matrix.cfg.arch}} (${{matrix.cfg.cpp-version}}) | ||
runs-on: ${{matrix.cfg.os}} | ||
strategy: | ||
fail-fast: false # Don't fail everything if one fails. We want to test each OS/Compiler individually | ||
matrix: | ||
cfg: | ||
- { arch: 'amd64', concurrency: 2, os: ubuntu-22.04, package: clang-14, cpp-version: clang++-14 } | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout Hexwave | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Add ffmpeg6 | ||
run: sudo add-apt-repository ppa:ubuntuhandbook1/ffmpeg6 && sudo apt update && sudo apt install ffmpeg | ||
|
||
- name: Read FFmpeg Version | ||
run: ffmpeg --version | ||
|
||
- name: Install apt packages | ||
run: sudo sed -i 's/azure\.//' /etc/apt/sources.list && sudo apt update && sudo apt install -y ${{ matrix.cfg.package }} pkg-config libavcodec-dev libavformat-dev libswscale-dev xorg-dev | ||
|
||
- name: Generate CMake | ||
run: cmake -B build | ||
env: | ||
CXX: ${{matrix.cfg.cpp-version}} | ||
|
||
- name: Build Project | ||
run: cmake --build build -j${{ matrix.cfg.concurrency }} | ||
|
||
- name: zip Build Folder | ||
run: zip -r hexwave-steamdeck.zip build | ||
|
||
- name: Upload zip | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | ||
with: | ||
name: "Hexwave Precompiled for Steam Deck" | ||
path: '${{github.workspace}}/hexwave-steamdeck.zip' |