Skip to content

Commit

Permalink
Experimenting with action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aregtech committed Nov 20, 2024
1 parent 429c7a0 commit cabd3d8
Showing 1 changed file with 169 additions and 0 deletions.
169 changes: 169 additions & 0 deletions .github/workflows/cmake-areg-opt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
name: CMake AREG OPT

on:
push: # Keep empty to run on each branch when push the code. Otherwise use branches: [ master ]
branches: # [ main ]
pull_request: # Set to master to run only when merge with master branch
branches: [ main ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Linux.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix

jobs:
job_windows:
name: Windows Platform, x86_64 and x86 builds
runs-on: windows-latest
steps:
- name: Windows - checkout AREG SDK Demo project sources and dependencies
uses: actions/checkout@v4

- name: Windows - Setup Java JDK on Windows to run code generator
uses: actions/setup-java@v4.4.0
with:
java-version: 17
java-package: jre
distribution: temurin

- name: Windows - Configure Demo, include AREG SDK after project(), MSVC on x64, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/msvc-cl-x64-so -DAREG_COMPILER_FAMILY=msvc

- name: Windows - Build Demo, include AREG SDK after project(), MSVC on x64, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/msvc-cl-x64-so -j20

- name: Windows - Configure Demo, include AREG SDK after project(), ClangCL on x64, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/llvm-x64-so -DAREG_COMPILER_FAMILY=llvm

- name: Build Demo, include AREG SDK after project(), ClangCL on x64, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/llvm-x64-so -j20

- name: Windows - Configure Demo, include AREG SDK after project(), MSVC on x86, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/msvc-cl-x86-so -DAREG_COMPILER_FAMILY=msvc -DAREG_PROCESSOR=x86

- name: Windows - Build Demo, include AREG SDK after project(), MSVC on x86, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/msvc-cl-x86-so -j20

- name: Windows - Configure Demo, include AREG SDK after project(), ClangCL on x86, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/llvm-x86-so -DAREG_COMPILER_FAMILY=llvm -DAREG_PROCESSOR=x86

- name: Windows - Build Demo, include AREG SDK after project(), ClangCL on x86, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/llvm-x86-so -j20


job_linux:
name: Linux Platform, x86_64, x86, arm, aarch64 builds
runs-on: ubuntu-latest
steps:
- name: Linux - Checkout AREG SDK Demo project sources and dependencies
uses: actions/checkout@v4

- name: Linux - Setup Java JDK on Windows to run code generator
uses: actions/setup-java@v4.4.0
with:
java-version: 17
java-package: jre
distribution: temurin

- name: Update compilers on Linux
# Update compilers, set C/C++ compilers
run: sudo apt-get update

- name: Linux - Configure Demo, include AREG SDK after project(), GNU on x64, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-x64-so -DAREG_COMPILER_FAMILY=gnu

- name: Linux - Build Demo, include AREG SDK after project(), GNU on x64, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-x64-so -j20

- name: Linux - Configure Demo, include AREG SDK after project(), LLVM on x64, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/llvm-x64-so -DAREG_COMPILER_FAMILY=llvm

- name: Linux - Build Demo, include AREG SDK after project(), LLVM on x64, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/llvm-x64-so -j20

- name: Linux - Install multilib
run: sudo apt-get install -y gcc-multilib g++-multilib

- name: Linux - Configure Demo, include AREG SDK after project(), GNU on x86, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-x86-so -DAREG_COMPILER_FAMILY=gnu -DAREG_PROCESSOR=x86

- name: Linux - Build Demo, include AREG SDK after project(), GNU on x86, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-x86-so -j20

- name: Linux - Configure Demo, include AREG SDK after project(), LLVM on x86, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/llvm-x86-so -DAREG_COMPILER_FAMILY=llvm -DAREG_PROCESSOR=x86

- name: Linux - Build Demo, include AREG SDK after project(), LLVM on x86, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/llvm-x86-so -j20

- name: Linux - Install GNU 32-bit ARM compilers
run: sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf

- name: Linux - Configure Demo, include AREG SDK after project(), GNU on arm32, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-arm-so -DAREG_COMPILER_FAMILY=gnu -DAREG_PROCESSOR=arm

- name: Linux - Build Demo, include AREG SDK after project(), GNU on arm32, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-arm-x86-so -j20

- name: Linux - Install GNU 64-bit AARCH64 compilers
run: sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu

- name: Linux - Configure Demo, include AREG SDK after project(), GNU on aarch64, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-aarch64-so -DAREG_COMPILER_FAMILY=gnu -DAREG_PROCESSOR=aarch64

- name: Linux - Build Demo, include AREG SDK after project(), GNU on aarch64, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-aarch64-x86-so -j20

job_macos:
name: macOS Platform, x64 builds
runs-on: macos-latest
steps:
- name: macOS - Checkout AREG SDK Demo project sources and dependencies
uses: actions/checkout@v4

- name: Linux - Setup Java JDK on Windows to run code generator
uses: actions/setup-java@v4.4.0
with:
java-version: 17
java-package: jre
distribution: temurin

- name: macOS - Configure Demo, include AREG SDK after project(), GNU on x64, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/gnu-x64-so -DAREG_COMPILER_FAMILY=gnu

- name: macOS - Build Demo, include AREG SDK after project(), GNU on x64, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/gnu-x64-so -j20

- name: macOS - Configure Demo, include AREG SDK after project(), LLVM on x64, shared
working-directory: ${{github.workspace}}
run: cmake -B ./product/cache/llvm-x64-so -DAREG_COMPILER_FAMILY=llvm

- name: macOS - Build Demo, include AREG SDK after project(), LLVM on x64, shared
working-directory: ${{github.workspace}}
run: cmake --build ./product/cache/llvm-x64-so -j20

0 comments on commit cabd3d8

Please sign in to comment.