Skip to content

Nightly

Nightly #2396

Workflow file for this run

name: Nightly
on:
workflow_dispatch:
schedule:
- cron: '53 7 * * *'
permissions:
contents: read
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install ghc
run: |
ghcup install ghc --set 9.10
ghcup install cabal --set 3.14
- name: Install dependencies
run: |
ghc --version
cabal --version
cabal update
cabal build --dependencies-only -fembed_data_files -fnightly pandoc-cli
- name: Build and install artifact
run: |
export ARTIFACTS=nightly-linux/pandoc-nightly-linux-$(date +%Y-%m-%d)
mkdir -p ${ARTIFACTS}
cabal install --installdir="${ARTIFACTS}" --install-method=copy -fembed_data_files -fnightly pandoc-cli
strip "${ARTIFACTS}/pandoc"
cp COPYRIGHT ${ARTIFACTS}/
echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
- uses: actions/upload-artifact@v7
with:
name: nightly-linux
path: nightly-linux
windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v6
- name: Install ghc
run: |
ghcup install ghc --set 9.10
ghcup install cabal --set 3.14
- name: Install dependencies
run: |
cabal update
cabal build --dependencies-only -fembed_data_files -fnightly pandoc-cli
- name: Build artifacts
shell: cmd
run: |
for /f %%a in ('powershell -Command "Get-Date -format yyyy-MM-dd"') do set THEDATE=%%a
set ARTIFACTS=%CD%\nightly-windows\pandoc-nightly-windows-%THEDATE%
mkdir %ARTIFACTS%
cabal install --install-method=copy --installdir=%ARTIFACTS% -fnightly -fembed_data_files pandoc-cli
strip %ARTIFACTS%/pandoc
copy COPYRIGHT %ARTIFACTS%
ren %ARTIFACTS%\COPYRIGHT COPYRIGHT.txt
echo Built from %GITHUB_SHA% > %ARTIFACTS%\README.nightly.txt
- uses: actions/upload-artifact@v7
with:
name: nightly-windows
path: nightly-windows
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- name: Install ghcup
run: |
brew install ghcup
- name: Install ghc
run: |
ghcup install ghc --set 9.10
ghcup install cabal --set 3.14
echo "$HOME/.ghcup/bin" >> "${GITHUB_PATH}"
- name: Install dependencies
run: |
cabal update
cabal build --dependencies-only -fnightly -fembed_data_files -fhttp pandoc-cli
- name: Build artifacts
run: |
export ARTIFACTS=nightly-macos/pandoc-nightly-macos-$(date +%Y-%m-%d)
mkdir -p ${ARTIFACTS}
cabal install --install-method=copy --installdir="${ARTIFACTS}" -fnightly -fembed_data_files pandoc-cli
strip "${ARTIFACTS}/pandoc"
cp COPYRIGHT ${ARTIFACTS}/
echo "Built from ${GITHUB_SHA}" > ${ARTIFACTS}/README.nightly.txt
- uses: actions/upload-artifact@v7
with:
name: nightly-macos
path: nightly-macos
# nightly workflow never finishes...
# wasm:
#
# runs-on: ubuntu-latest
# strategy:
# fail-fast: true
# steps:
# - uses: actions/checkout@v6
# - uses: wimpysworld/nothing-but-nix@v9
# with:
# hatchet-protocol: 'rampage'
# - uses: cachix/install-nix-action@v31
# with:
# nix_path: nixpkgs=channel:nixos-unstable
# - name: Cache cabal work
# id: cabal-local
# uses: actions/cache@v5
# with:
# path: |
# dist-newstyle
# key: ${{ runner.os }}-nix-cabal-local-${{ secrets.CACHE_VERSION }}
# - name: Build pandoc.wasm
# run: |
# nix develop --command bash -c "make pandoc.wasm"
# - name: Upload artifact
# uses: actions/upload-artifact@v7
# with:
# name: nightly-wasm
# path: pandoc.wasm