build(deps): bump JamesIves/github-pages-deploy-action #906
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: ci | |
| on: | |
| push: | |
| paths-ignore: | |
| - "**.md" | |
| - "**.rst" | |
| - "**.ipynb" | |
| - "docs/**" | |
| - ".readthedocs.yaml" | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| - "**.rst" | |
| - "**.ipynb" | |
| - "docs/**" | |
| - ".readthedocs.yaml" | |
| release: | |
| types: | |
| - published | |
| env: | |
| buildDir: "${{ github.workspace }}/build/" | |
| NWN_ROOT: "${{ github.workspace }}/nwn/" | |
| CI_GITHUB_ACTIONS: "1" | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-14, ubuntu-22.04, windows-2022] | |
| runs-on: ${{ matrix.os }} | |
| name: Build ${{ matrix.os }} | |
| steps: | |
| - name: Get current date | |
| if: matrix.os != 'windows-2022' | |
| run: | | |
| echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
| - name: Get current date | |
| if: matrix.os == 'windows-2022' | |
| run: | | |
| echo "DATE=$(Get-Date -Format yyyy-MM-dd)" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| # Windows dependencies | |
| - name: windows - install dependencies | |
| if: matrix.os == 'windows-2022' | |
| run: | | |
| choco upgrade ccache ninja | |
| # macOS Dependencies | |
| - name: macOS - install dependencies | |
| if: matrix.os == 'macos-14' | |
| env: | |
| HOMEBREW_NO_ANALYTICS: "ON" | |
| HOMEBREW_NO_AUTO_UPDATE: "ON" | |
| HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: "ON" | |
| HOMEBREW_NO_INSTALL_CLEANUP: "ON" | |
| run: | | |
| brew install --force --overwrite pkg-config automake ninja libtool zlib ccache | |
| # Linux dependencies | |
| - name: linux - install gcc | |
| if: ${{ runner.os == 'Linux' }} | |
| run: | | |
| sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| sudo apt update | |
| sudo apt install gcc-13 g++-13 ccache -y | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100 | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| # Install latest CMake. | |
| - uses: lukka/get-cmake@latest | |
| with: | |
| cmakeVersion: 3.29.4 | |
| - name: all - cache ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/.ccache/ | |
| key: ${{ matrix.os }}-ccache-${{ env.DATE }} | |
| restore-keys: | | |
| ${{ matrix.os }}-ccache- | |
| # nwn | |
| - name: all - cache nwn | |
| id: cache-nwn | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/nwn/ | |
| key: cache-nwn-3e02cddcea5d0ae82111a3038f14aef6c14d05d9 | |
| - name: all - download nwn | |
| if: steps.cache-nwn.outputs.cache-hit != 'true' | |
| run: | | |
| curl https://nwn.beamdog.net/downloads/nwnee-dedicated-8193.34.zip -O | |
| unzip nwnee-dedicated-8193.34.zip -d ${{ github.workspace }}/nwn/ | |
| ls -l ${{ github.workspace }}/nwn/ | |
| # build the normal libraries | |
| - name: windows - Visual Studio shell | |
| if: matrix.os == 'windows-2022' | |
| uses: egor-tensin/vs-shell@v2 | |
| with: | |
| arch: x64 | |
| - name: setup ccache | |
| run: | | |
| ccache --set-config=cache_dir=${{ github.workspace }}/.ccache | |
| ccache --set-config=max_size=5G | |
| ccache --set-config=compression=true | |
| - name: ccache - setenv | |
| if: ${{ runner.os != 'Windows' }} | |
| run: | | |
| env | |
| export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
| echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH | |
| HOST_CCACHE_DIR="$(ccache -k cache_dir)" | |
| mkdir -p $HOST_CCACHE_DIR | |
| - name: ccache - setenv | |
| if: ${{ runner.os == 'Windows' }} | |
| run: | | |
| $env:HOST_CCACHE_DIR="$(ccache -k cache_dir)" | |
| md $env:HOST_CCACHE_DIR -ea 0 | |
| - name: windows - configure | |
| if: matrix.os == 'windows-2022' | |
| run: | | |
| cmake --preset ci-windows | |
| - name: macOS - configure | |
| if: matrix.os == 'macos-14' | |
| run: | | |
| cmake --preset ci-macos | |
| - name: linux - configure | |
| if: matrix.os == 'ubuntu-22.04' | |
| run: | | |
| cmake --preset ci-linux | |
| - name: all - build & test | |
| run: | | |
| cmake --build --preset default | |
| ctest --preset default | |
| - name: ccache stats | |
| run: | | |
| ccache -s |