trigger build when docker folder changes #9
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" | |
| - "docker" | |
| pull_request: | |
| branches: | |
| - "*" | |
| - "*/*" | |
| - "**" | |
| paths: | |
| - "**.cpp" | |
| - "**.hpp" | |
| - "**.h" | |
| - "**.c" | |
| - ".github/workflows/build.yml" | |
| - "docker" | |
| jobs: | |
| build-windows-release: | |
| runs-on: windows-2022 | |
| 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 .. -G "Visual Studio 17 2022" -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-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| clean: true | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Build | |
| run: | | |
| cd docker | |
| chmod +x ./build.sh | |
| chmod +x ./docker-entrypoint.sh | |
| ./build.sh | |
| - name: Create a folder for release | |
| shell: bash | |
| run: | | |
| mkdir dist | |
| cd dist | |
| mkdir components | |
| mkdir -p qawno/include | |
| cd .. | |
| mv docker/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/* |