add fetch-log (partially untested, will improve soon) #2
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: Build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - "*" | |
| - "*/*" | |
| - "**" | |
| paths: | |
| - "**.cpp" | |
| - "**.hpp" | |
| - "**.h" | |
| - "**.c" | |
| - ".github/workflows/build.yml" | |
| pull_request: | |
| branches: | |
| - "*" | |
| - "*/*" | |
| - "**" | |
| paths: | |
| - "**.cpp" | |
| - "**.hpp" | |
| - "**.h" | |
| - "**.c" | |
| - ".github/workflows/build.yml" | |
| jobs: | |
| build-windows-release: | |
| runs-on: windows-2019 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| clean: true | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Generate build files | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -DCMAKE_BUILD_TYPE=Release .. -A Win32 | |
| cmake --build . --config Release | |
| - name: Create a folder for release | |
| shell: bash | |
| run: | | |
| mkdir dist | |
| cd dist | |
| mkdir components | |
| mkdir -p qawno/include | |
| cd .. | |
| mv ./build/src/Release/omp-logger.dll ./dist/components/omp-logger.dll | |
| mv ./omp-logger.inc ./dist/qawno/include/omp-logger.inc | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: omp-logger-win | |
| path: dist/* | |
| build-linux-release: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| clean: true | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Install gcc/g++-multilib | |
| run: | | |
| sudo dpkg --add-architecture i386 | |
| sudo apt-get update | |
| sudo apt install gcc-9-multilib g++-9-multilib libstdc++-10-dev:i386 | |
| - name: Build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 | |
| cmake --build . --parallel $(nproc) | |
| - name: Create a folder for release | |
| shell: bash | |
| run: | | |
| mkdir dist | |
| cd dist | |
| mkdir components | |
| mkdir -p qawno/include | |
| cd .. | |
| mv ./build/src/omp-logger.so ./dist/components/omp-logger.so | |
| mv ./omp-logger.inc ./dist/qawno/include/omp-logger.inc | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: omp-logger-linux | |
| path: dist/* |