Native build by dabrain34 #1
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
name: "video_generator native build" | |
run-name: Native build by ${{ github.actor }} | |
on: | |
workflow_dispatch: | |
workflow_call: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
env: | |
REPO_NAME: video_generator | |
jobs: | |
clang-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Clang-Format | |
run: sudo apt-get update && sudo apt-get -y install clang-format | |
- name: Run Clang-Format | |
run: | | |
find . -name "*.cpp" -o -name "*.hpp" | xargs -I {} clang-format -i {} -n --verbose --Werror | |
ci-linux-x86_64: | |
strategy: | |
matrix: | |
platform: [linux-x86_64, linux-x86] | |
runs-on: ubuntu-22.04 | |
env: | |
TERM: dumb | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set environment variables | |
run: | | |
echo "DESTDIR=$REPO_NAME-release" >> $GITHUB_ENV | |
- name: Set i386 environment variables | |
if: matrix.platform == 'linux-x86' | |
run: | | |
echo "CC=cc -m32" >> $GITHUB_ENV | |
echo "CXX=c++ -m32" >> $GITHUB_ENV | |
echo "PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig/" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install --assume-yes --no-install-recommends valgrind python3-pip ninja-build | |
sudo apt install cmake | |
- name: Install i386 dependencies | |
if: matrix.platform == 'linux-x86' | |
run: | | |
sudo dpkg --add-architecture i386 | |
sudo apt update | |
sudo apt install gcc-multilib g++-multilib libc6-dbg:i386 | |
# hack to avoid that zlib x64 gets picked up | |
sudo apt remove --assume-yes zlib1g-dev | |
- name: Build | |
shell: bash | |
run: | | |
cd build | |
./build.sh | |
ci-win64: | |
strategy: | |
matrix: | |
platform: [windows-x64, windows-x86] | |
runs-on: windows-latest | |
steps: | |
- name: Set up X86 MSVC environment | |
if: matrix.platform == 'windows-x86' | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: "x86" | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set environment variables | |
run: echo "DESTDIR=$Env:REPO_NAME-release" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Install dependencies | |
run: | | |
choco install --yes zip | |
- name: Install python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install cmake | |
run: choco install cmake | |
- name: Build | |
shell: bash | |
run: | | |
cd build | |
./build.sh |