mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
Followup to #24154, packages aren't ready for macos 14 (M1/ARM CPU) yet and it seems to be preview on azure, so upgrade to macos 13 for now. Macos 12 gives a warning: ``` You are using macOS 12. We (and Apple) do not provide support for this old version. It is expected behaviour that some formulae will fail to build in this old version. It is expected behaviour that Homebrew will be buggy and slow. Do not create any issues about this on Homebrew's GitHub repositories. Do not create any issues even if you think this message is unrelated. Any opened issues will be immediately closed without response. Do not ask for help from Homebrew or its maintainers on social media. You may ask for help in Homebrew's discussions but are unlikely to receive a response. Try to figure out the problem yourself and submit a fix as a pull request. We will review it but may or may not accept it. ```
117 lines
3.2 KiB
YAML
117 lines
3.2 KiB
YAML
name: Nim Docs CI
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'compiler/**.nim'
|
|
- 'config/nimdoc.cfg'
|
|
- 'doc/**.rst'
|
|
- 'doc/**.md'
|
|
- 'doc/nimdoc.css'
|
|
- 'lib/**.nim'
|
|
- 'nimdoc/testproject/expected/testproject.html'
|
|
- 'tools/dochack/dochack.nim'
|
|
- 'tools/kochdocs.nim'
|
|
- '.github/workflows/ci_docs.yml'
|
|
- 'koch.nim'
|
|
|
|
pull_request:
|
|
# Run only on changes on these files.
|
|
paths:
|
|
- 'compiler/**.nim'
|
|
- 'config/nimdoc.cfg'
|
|
- 'doc/**.rst'
|
|
- 'doc/**.md'
|
|
- 'doc/nimdoc.css'
|
|
- 'lib/**.nim'
|
|
- 'nimdoc/testproject/expected/testproject.html'
|
|
- 'tools/dochack/dochack.nim'
|
|
- 'tools/kochdocs.nim'
|
|
- '.github/workflows/ci_docs.yml'
|
|
- 'koch.nim'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [linux, windows, osx]
|
|
include:
|
|
- target: linux
|
|
os: ubuntu-20.04
|
|
- target: windows
|
|
os: windows-2019
|
|
- target: osx
|
|
os: macos-13
|
|
|
|
name: ${{ matrix.target }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 60 # refs bug #18178
|
|
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: 'Install build dependencies (macOS)'
|
|
if: runner.os == 'macOS'
|
|
run: brew install make
|
|
|
|
- name: 'Install build dependencies (Windows)'
|
|
if: runner.os == 'Windows'
|
|
shell: bash
|
|
run: |
|
|
set -e
|
|
. ci/funs.sh
|
|
nimInternalInstallDepsWindows
|
|
echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}"
|
|
|
|
- name: 'Add build binaries to PATH'
|
|
shell: bash
|
|
run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}"
|
|
|
|
- name: 'System information'
|
|
shell: bash
|
|
run: . ci/funs.sh && nimCiSystemInfo
|
|
|
|
- name: 'Build csourcesAny (posix)'
|
|
# this would work on windows and other CI use this on windows,
|
|
# but we ensure here that `ci/build_autogen.bat` keeps working on windows.
|
|
if: runner.os != 'Windows'
|
|
shell: bash
|
|
run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc
|
|
# was previously using caching via `actions/cache@v1` but this wasn't
|
|
# used in other CI pipelines and it's unclear the added complexity
|
|
# was worth the saving; can be revisited if needed.
|
|
|
|
- name: 'Build csourcesAny (windows)'
|
|
if: runner.os == 'Windows'
|
|
shell: cmd
|
|
run: ci/build_autogen.bat
|
|
|
|
- name: 'Build koch'
|
|
shell: bash
|
|
run: nim c koch
|
|
|
|
- name: 'Build the real compiler'
|
|
shell: bash
|
|
run: ./koch boot -d:release
|
|
|
|
- name: 'Build documentation'
|
|
shell: bash
|
|
run: ./koch doc --git.commit:devel
|
|
|
|
- name: 'Publish documentation to Github Pages'
|
|
if: |
|
|
github.event_name == 'push' && github.ref == 'refs/heads/devel' &&
|
|
matrix.target == 'linux'
|
|
uses: crazy-max/ghaction-github-pages@v4
|
|
with:
|
|
build_dir: doc/html
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|