Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dw/enzyme
Browse files Browse the repository at this point in the history
  • Loading branch information
mhauru committed Jun 21, 2024
2 parents 2823a41 + fcb4ca7 commit f4c72bd
Show file tree
Hide file tree
Showing 90 changed files with 4,114 additions and 3,269 deletions.
21 changes: 21 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
style="blue"
format_markdown = true
import_to_using = false
# TODO
# We ignore these files because when formatting was first put in place they were being worked on.
# These ignores should be removed once the relevant PRs are merged/closed.
ignore = [
# https://github.com/TuringLang/Turing.jl/pull/2231/files
"src/experimental/gibbs.jl",
"src/mcmc/abstractmcmc.jl",
"test/experimental/gibbs.jl",
"test/test_utils/numerical_tests.jl",
# https://github.com/TuringLang/Turing.jl/pull/2218/files
"src/mcmc/Inference.jl",
"test/mcmc/Inference.jl",
# https://github.com/TuringLang/Turing.jl/pull/1887 # Enzyme PR
"test/mcmc/Inference.jl",
"test/mcmc/hmc.jl",
"test/mcmc/sghmc.jl",
"test/runtests.jl",
]
41 changes: 0 additions & 41 deletions .github/workflows/DynamicHMC.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/Format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Format

on:
push:
branches:
- master
pull_request:
branches:
- master
merge_group:
types: [checks_requested]

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
with:
version: 1
- name: Format code
run: |
using Pkg
Pkg.add(; name="JuliaFormatter", uuid="98e50ef6-434e-11e9-1051-2b60c6c9e899")
using JuliaFormatter
format("."; verbose=true)
shell: julia --color=yes {0}
- uses: reviewdog/action-suggester@v1
if: github.event_name == 'pull_request'
with:
tool_name: JuliaFormatter
fail_on_error: true
40 changes: 0 additions & 40 deletions .github/workflows/Numerical.yml

This file was deleted.

87 changes: 87 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Tests

on:
push:
branches:
- master
pull_request:

jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}

strategy:
fail-fast: false
matrix:
test-args:
# Run some of the slower test files individually. The last one catches everything
# not included in the others.
- "essential/ad.jl"
- "mcmc/gibbs.jl"
- "mcmc/hmc.jl"
- "mcmc/abstractmcmc.jl"
- "mcmc/Inference.jl"
- "experimental/gibbs.jl"
- "mcmc/ess.jl"
- "--skip essential/ad.jl mcmc/gibbs.jl mcmc/hmc.jl mcmc/abstractmcmc.jl mcmc/Inference.jl experimental/gibbs.jl mcmc/ess.jl"
version:
#- '1.7' TODO(mhauru): Temporarily disabled for Enzyme
- '1'
os:
- ubuntu-latest
#- windows-latest TODO(mhauru): Temporarily disabled for Enzyme
#- macOS-latest TODO(mhauru): Temporarily disabled for Enzyme
arch:
- x64
#- x86 TODO(mhauru): Temporarily disabled for Enzyme
num_threads:
- 1
- 2
exclude:
# With Windows and macOS, only run Julia 1.7, x64, 2 threads. We just want to see
# some combination work on OSes other than Ubuntu.
- os: windows-latest
version: '1'
- os: macOS-latest
version: '1'
- os: windows-latest
arch: x86
- os: macOS-latest
arch: x86
- os: windows-latest
num_threads: 1
- os: macOS-latest
num_threads: 1
# It's sufficient to test x86 with one version of Julia and one thread.
- version: '1'
arch: x86
- num_threads: 2
arch: x86

steps:
- name: Print matrix variables
run: |
echo "OS: ${{ matrix.os }}"
echo "Architecture: ${{ matrix.arch }}"
echo "Julia version: ${{ matrix.version }}"
echo "Number of threads: ${{ matrix.num_threads }}"
echo "Test arguments: ${{ matrix.test-args }}"
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '${{ matrix.version }}'
arch: ${{ matrix.arch }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@latest
- name: Call Pkg.test
run: julia --color=yes --depwarn=yes --check-bounds=yes --threads=${{ matrix.num_threads }} --project=@. -e 'import Pkg; Pkg.test(; test_args=ARGS)' -- ${{ matrix.test-args }}
56 changes: 0 additions & 56 deletions .github/workflows/TuringCI.yml

This file was deleted.

Loading

0 comments on commit f4c72bd

Please sign in to comment.