CI #310
Workflow file for this run
This file contains 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: | |
pull_request: | |
push: | |
branches: | |
- main | |
tags: '*' | |
merge_group: # GitHub merge queue | |
concurrency: | |
# Skip intermediate builds: all builds except for builds on the `main` branch | |
# Cancel intermediate builds: only pull request builds | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
permissions: | |
contents: read | |
jobs: | |
finalize: | |
if: always() # this line is important to keep the `finalize` job from being marked as skipped; do not change or delete this line | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
needs: [build, checked-in-files, example, make-targets, stalecheck-npm-install] | |
steps: | |
- run: | | |
echo build: ${{ needs.build.result }} | |
echo checked-in-files: ${{ needs.checked-in-files.result }} | |
echo example: ${{ needs.example.result }} | |
echo make-targets: ${{ needs.make-targets.result }} | |
echo stalecheck-npm-install: ${{ needs.stalecheck-npm-install.result }} | |
# The last line must NOT end with || | |
# All other lines MUST end with || | |
- run: exit 1 | |
if: | | |
(needs.build.result != 'success') || | |
(needs.checked-in-files.result != 'success') || | |
(needs.example.result != 'success') || | |
(needs.make-targets.result != 'success') || | |
(needs.stalecheck-npm-install.result != 'success') | |
build: | |
timeout-minutes: 30 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
steps: | |
### Check out the repo: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
with: | |
persist-credentials: false | |
### Cleanall: | |
- run: make cleanall | |
### Install NodeJS | |
# Unix (non-Windows): | |
- uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 | |
if: runner.os != 'Windows' | |
- run: make unix-asdf-install | |
if: runner.os != 'Windows' | |
# Windows: | |
# Windows does not support asdf, so we have to use `actions/setup-node` | |
# to install asdf: | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
if: runner.os == 'Windows' | |
with: | |
node-version-file: '.tool-versions' | |
### Install the NodeJS packages that we depend on: | |
- run: make install-packages | |
### Print some debugging info: | |
- name: Print the NodeJS version (for debugging) | |
run: | | |
which -a node | |
node --version | |
which -a npm | |
npm --version | |
### Build: | |
- run: make build | |
- run: make pack | |
### Make sure some other `make` targets don't bitrot: | |
- name: Run some other `make` targets to ensure that they don't bitrot | |
run: | | |
make clean | |
make cleanall | |
- name: Run all of the "cleaning" `make` targets to ensure that they don't bitrot | |
run: | | |
make clean | |
make cleanall | |
checked-in-files: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
### Check out the repo: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
with: | |
persist-credentials: false | |
### Cleanall: | |
- run: make cleanall | |
### Install NodeJS | |
# Unix (non-Windows): | |
- uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 | |
if: runner.os != 'Windows' | |
- run: make unix-asdf-install | |
if: runner.os != 'Windows' | |
# Windows: | |
# Windows does not support asdf, so we have to use `actions/setup-node` | |
# to install asdf: | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
if: runner.os == 'Windows' | |
with: | |
node-version-file: '.tool-versions' | |
### Install the NodeJS packages that we depend on: | |
- run: make install-packages | |
### Print some debugging info: | |
- name: Print the NodeJS version (for debugging) | |
run: | | |
which -a node | |
node --version | |
which -a npm | |
npm --version | |
### Build: | |
- run: make pack | |
### Clean (not cleanall!): | |
- run: make clean | |
### Make sure there are no uncommited changes | |
- uses: julia-actions/setup-julia@f2258781c657ad9b4b88072c5eeaf9ec8c370874 | |
with: | |
version: '1' | |
- run: git --no-pager status | |
- run: git --no-pager diff | |
- run: julia ./bin/check_uncommitted_changes.jl | |
example: | |
timeout-minutes: 30 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
channel: | |
- '1.9.4' | |
- '1.10.2' | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-13 # Intel | |
- macos-14 # Apple Silicon | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
with: | |
persist-credentials: false | |
- name: '[before] Print some output for debugging purposes' | |
shell: bash | |
run: | | |
set -x | |
echo "PATH is: ${PATH:?}" | |
# which -a julia | |
# julia --version | |
# which -a juliaup | |
# juliaup --version | |
# continue-on-error: true | |
# Note: we intentionally do not use `continue-on-error` for individual job steps. | |
# If you use `continue-on-error` for an individual job step, then if that job | |
# step fails, it prints a bunch of "error" annotations in the "Annotations" section. | |
# This is quite noisy and not helpful. | |
- name: Run the local copy of this action (that is checked in to source control) | |
uses: ./ | |
with: | |
channel: ${{ matrix.channel }} | |
- run: julia ci/test.jl | |
env: | |
EXPECTED_JULIA_VERSION_FOR_TESTS: ${{ matrix.channel }} | |
- name: '[after] Print some output for debugging purposes' | |
shell: bash | |
run: | | |
set -x | |
echo "PATH is: ${PATH:?}" | |
which -a julia | |
julia --version | |
which -a juliaup | |
juliaup --version | |
- name: '[after] Print some more debugging output' | |
shell: julia --color=yes {0} | |
run: | | |
cmd = Base.julia_cmd() | |
julia_path = cmd.exec[1] | |
@info "" julia_path Base.VERSION | |
# lint-check: | |
# timeout-minutes: 30 | |
# runs-on: ubuntu-latest | |
# strategy: | |
# fail-fast: false | |
# steps: | |
# ### Check out the repo: | |
# - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
# with: | |
# persist-credentials: false | |
# ### Install the deps | |
# - uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 | |
# - run: make unix-asdf-install | |
# ### Lint: | |
# - run: make check-lint | |
make-targets: # This is a job to make sure that none of the `make` targets bitrot | |
timeout-minutes: 30 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
steps: | |
### Check out the repo: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
with: | |
persist-credentials: false | |
### Cleanall: | |
- run: make cleanall | |
### Install NodeJS | |
# Unix (non-Windows): | |
- uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 | |
if: runner.os != 'Windows' | |
- run: make unix-asdf-install | |
if: runner.os != 'Windows' | |
### Install the NodeJS packages that we depend on: | |
- run: make install-packages | |
### Make sure some other `make` targets don't bitrot: | |
- name: Run some other `make` targets to ensure that they don't bitrot | |
run: | | |
make unix-asdf-install | |
make install-packages | |
make build | |
make pack | |
make everything-from-scratch | |
- name: Run all of the "cleaning" `make` targets to ensure that they don't bitrot | |
run: | | |
make clean | |
make cleanall | |
stalecheck-npm-install: | |
# TODO: consider removing this job from `finalize`. | |
# | |
# In this job, we are basically trying to check if `package-lock.json` is in | |
# sync with `package-lock.json`. | |
# | |
# So, for example, if someone manually edits the `package.json` file, we want | |
# to make sure that the `package-lock.json` file is not out of sync with the | |
# `package.json` file. | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
### Check out the repo: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
with: | |
persist-credentials: false | |
### Install NodeJS | |
# Unix (non-Windows): | |
- uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6 | |
if: runner.os != 'Windows' | |
- run: make unix-asdf-install | |
if: runner.os != 'Windows' | |
### Run the main commands for this job: | |
- run: make clean | |
- run: npm ci | |
# - run: npm install --package-lock-only | |
- run: npm install | |
### Make sure there are no uncommited changes | |
- uses: julia-actions/setup-julia@f2258781c657ad9b4b88072c5eeaf9ec8c370874 | |
with: | |
version: '1' | |
- run: git --no-pager status | |
- run: git --no-pager diff | |
- run: julia ./bin/check_uncommitted_changes.jl |