Removes redundant profiling step #28
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 Build Matrix | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| build-snap-linux: | |
| name: Linux x86 (Snap Publish) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake libopencv-dev libtbb-dev libomp-dev | |
| - name: Configure and Build Tests (Linux) | |
| run: | | |
| mkdir build_test | |
| cd build_test | |
| cmake .. -DCMAKE_CXX_STANDARD=23 -DENABLE_CUDA=OFF | |
| make -j$(nproc) | |
| - name: Run Unit Tests (Linux) | |
| run: | | |
| cd build_test | |
| ./absTest | |
| ./dct2Test | |
| ./dct2Test3 | |
| - name: Upload Executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TinyDIP-build-${{ runner.os }} | |
| path: | | |
| build_test/* | |
| retention-days: 90 | |
| - name: Clean up Build Artifacts | |
| run: rm -rf build_test | |
| - name: Build Snap Package | |
| uses: snapcore/action-build@v1 | |
| id: build | |
| with: | |
| snapcraft-args: --target-arch amd64 | |
| - name: Publish Snap | |
| uses: snapcore/action-publish@v1 | |
| env: | |
| SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }} | |
| with: | |
| snap: ${{ steps.build.outputs.snap }} | |
| release: edge | |
| verify-linux-gcc-15-source: | |
| name: Linux x86 (GCC 15.2.0 Source) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake libopencv-dev libtbb-dev libomp-dev flex bison libgmp-dev libmpfr-dev libmpc-dev | |
| - name: Cache Custom GCC | |
| id: cache-gcc | |
| uses: actions/cache@v3 | |
| with: | |
| path: /opt/gcc-15.2.0 | |
| key: gcc-15.2.0-source-build-${{ runner.os }}-v1 | |
| - name: Compile GCC 15.2.0 from Source | |
| if: steps.cache-gcc.outputs.cache-hit != 'true' | |
| run: | | |
| echo "Compiling GCC 15.2.0 from source... This may take 1-2 hours." | |
| wget https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz | |
| tar xzf gcc-15.2.0.tar.gz | |
| cd gcc-15.2.0 | |
| ./contrib/download_prerequisites | |
| mkdir build && cd build | |
| ../configure --prefix=/opt/gcc-15.2.0 --enable-languages=c,c++ --disable-multilib | |
| make -j$(nproc) | |
| sudo make install | |
| cd ../.. | |
| rm -rf gcc-15.2.0 gcc-15.2.0.tar.gz | |
| - name: Configure and Build Tests (Linux GCC 15) | |
| run: | | |
| mkdir build_test_gcc | |
| cd build_test_gcc | |
| cmake .. \ | |
| -DCMAKE_CXX_STANDARD=23 \ | |
| -DENABLE_CUDA=OFF \ | |
| -DCMAKE_C_COMPILER=/opt/gcc-15.2.0/bin/gcc \ | |
| -DCMAKE_CXX_COMPILER=/opt/gcc-15.2.0/bin/g++ \ | |
| -DCMAKE_CXX_FLAGS="-Wl,-rpath,/opt/gcc-15.2.0/lib64" | |
| make -j$(nproc) | |
| - name: Run Unit Tests (Linux GCC 15) | |
| run: | | |
| cd build_test_gcc | |
| ./absTest | |
| ./dct2Test | |
| - name: Upload Executable (GCC 15) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TinyDIP-build-gcc15-${{ runner.os }} | |
| path: build_test_gcc/* | |
| retention-days: 90 | |
| - name: Clean up Build Artifacts | |
| run: rm -rf build_test_gcc | |
| verify-linux-gcc-15-self-hosted: | |
| name: Linux x86 (GCC 15.2.0 - Local Machine) | |
| runs-on: [self-hosted, linux] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check Environment | |
| run: | | |
| g++ --version | |
| cmake --version | |
| /opt/gcc-15.2.0/bin/g++ --version | |
| - name: Configure and Build Tests (Fast) | |
| run: | | |
| rm -rf build_test_gcc_local | |
| mkdir build_test_gcc_local | |
| cd build_test_gcc_local | |
| cmake .. \ | |
| -DCMAKE_CXX_STANDARD=23 \ | |
| -DENABLE_CUDA=OFF \ | |
| -DCMAKE_C_COMPILER=/opt/gcc-15.2.0/bin/gcc \ | |
| -DCMAKE_CXX_COMPILER=/opt/gcc-15.2.0/bin/g++ \ | |
| -DCMAKE_CXX_FLAGS="-Wl,-rpath,/opt/gcc-15.2.0/lib64" | |
| make -j$(nproc) | |
| - name: Run Unit Tests | |
| run: | | |
| cd build_test_gcc_local | |
| ./absTest | |
| ./dct2Test | |
| - name: Upload Executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: TinyDIP-build-gcc15-self-hosted | |
| path: build_test_gcc_local/* | |
| retention-days: 90 | |
| - name: Final Clean up | |
| if: always() | |
| run: rm -rf build_test_gcc_local | |
| linux-perf-profiling: | |
| name: Linux x86 (Perf Profiling) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake libopencv-dev libtbb-dev libomp-dev linux-tools-generic | |
| - name: Configure and Build Tests (Linux) | |
| run: | | |
| mkdir build_test | |
| cd build_test | |
| cmake .. -DCMAKE_CXX_STANDARD=23 -DENABLE_CUDA=OFF -DCMAKE_CXX_FLAGS="-fno-omit-frame-pointer" | |
| make -j$(nproc) | |
| - name: Run Performance Profiling (perf) | |
| run: | | |
| cd build_test | |
| echo "=========================================" | |
| echo "Profiling ./absTest" | |
| echo "=========================================" | |
| sudo perf record -o perf_abs.data --call-graph dwarf ./absTest | |
| sudo perf report -i perf_abs.data --stdio | |
| echo "=========================================" | |
| echo "Profiling ./dct2Test" | |
| echo "=========================================" | |
| sudo perf record -o perf_dct2.data --call-graph dwarf ./dct2Test | |
| sudo perf report -i perf_dct2.data --stdio | |
| - name: Clean up Build Artifacts | |
| run: rm -rf build_test | |
| verify-macos: | |
| name: macOS (GCC 14) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Dependencies | |
| run: | | |
| brew update | |
| brew install gcc cmake opencv tbb libomp | |
| - name: Configure CMake (macOS) | |
| run: | | |
| mkdir build_mac | |
| cd build_mac | |
| cmake .. \ | |
| -DCMAKE_CXX_STANDARD=23 \ | |
| -DENABLE_CUDA=OFF \ | |
| -DCMAKE_C_COMPILER="gcc-14" \ | |
| -DCMAKE_CXX_COMPILER="g++-14" | |
| - name: Build (macOS) | |
| run: | | |
| cd build_mac | |
| make -j3 |