From d61127b3b23501973e3c152a8410c1909a0ed466 Mon Sep 17 00:00:00 2001 From: mkanamaru Date: Wed, 2 Jul 2025 17:02:37 +0200 Subject: [PATCH 1/2] Add GitHub Actions CI for multi-platform testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Test on Julia 1.10 (LTS) and latest version - Run tests on Ubuntu, macOS, and Windows - Include documentation and formatting checks - Set up proper test matrix for comprehensive coverage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/CI.yml | 95 ++++++++++++++++++++++++++++++++++------ 1 file changed, 82 insertions(+), 13 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6af62e1..051168a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,40 +1,109 @@ name: CI + on: push: branches: - main - tags: ['*'] pull_request: + branches: + - main workflow_dispatch: -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: test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} runs-on: ${{ matrix.os }} - timeout-minutes: 60 - permissions: # needed to allow julia-actions/cache to proactively delete old caches that it has created - actions: write - contents: read strategy: fail-fast: false matrix: version: - - '1.11' - - 'pre' + - '1.10' # LTS version + - '1' # Latest stable release os: - ubuntu-latest + - macOS-latest + - windows-latest arch: - x64 steps: - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v2 + with: + cache-name: ci-cache-${{ matrix.os }}-${{ matrix.version }} + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + env: + JULIA_NUM_THREADS: 2 + + - uses: julia-actions/julia-processcoverage@v1 + + - uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: lcov.info + fail_ci_if_error: false + + docs: + name: Documentation + runs-on: ubuntu-latest + permissions: + contents: write + pages: write + id-token: write + steps: + - uses: actions/checkout@v4 + + - uses: julia-actions/setup-julia@v2 + with: + version: '1' + + - uses: julia-actions/cache@v2 + + - name: Install dependencies + run: | + julia --project=docs -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + + - name: Build and deploy documentation + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + run: | + julia --project=docs -e ' + using Documenter: DocMeta, doctest + using FOVSimulator + DocMeta.setdocmeta!(FOVSimulator, :DocTestSetup, :(using FOVSimulator); recursive=true) + doctest(FOVSimulator)' + julia --project=docs docs/make.jl + + format: + name: JuliaFormatter + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: julia-actions/setup-julia@v2 + with: + version: '1' + + - name: Install JuliaFormatter + run: | + julia -e 'using Pkg; Pkg.add("JuliaFormatter")' + + - name: Check formatting + run: | + julia -e ' + using JuliaFormatter + if !format(".", verbose=true) + error("Some files are not properly formatted") + end' \ No newline at end of file From 80e18106e92696852529bf8023c0f74982d39270 Mon Sep 17 00:00:00 2001 From: mkanamaru Date: Wed, 2 Jul 2025 17:17:33 +0200 Subject: [PATCH 2/2] Fix CI configuration issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Lower Julia version requirement from 1.11 to 1.10 for compatibility - Remove LinearAlgebra from compat section (standard library) - Remove JuliaFormatter job (not needed currently) - Remove Documentation job (no docs directory yet) - Make CODECOV_TOKEN optional 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/CI.yml | 56 ---------------------------------------- Project.toml | 3 +-- 2 files changed, 1 insertion(+), 58 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 051168a..2f20639 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -47,63 +47,7 @@ jobs: - uses: codecov/codecov-action@v4 with: - token: ${{ secrets.CODECOV_TOKEN }} files: lcov.info fail_ci_if_error: false - docs: - name: Documentation - runs-on: ubuntu-latest - permissions: - contents: write - pages: write - id-token: write - steps: - - uses: actions/checkout@v4 - - - uses: julia-actions/setup-julia@v2 - with: - version: '1' - - - uses: julia-actions/cache@v2 - - - name: Install dependencies - run: | - julia --project=docs -e ' - using Pkg - Pkg.develop(PackageSpec(path=pwd())) - Pkg.instantiate()' - - - name: Build and deploy documentation - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} - run: | - julia --project=docs -e ' - using Documenter: DocMeta, doctest - using FOVSimulator - DocMeta.setdocmeta!(FOVSimulator, :DocTestSetup, :(using FOVSimulator); recursive=true) - doctest(FOVSimulator)' - julia --project=docs docs/make.jl - format: - name: JuliaFormatter - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: julia-actions/setup-julia@v2 - with: - version: '1' - - - name: Install JuliaFormatter - run: | - julia -e 'using Pkg; Pkg.add("JuliaFormatter")' - - - name: Check formatting - run: | - julia -e ' - using JuliaFormatter - if !format(".", verbose=true) - error("Some files are not properly formatted") - end' \ No newline at end of file diff --git a/Project.toml b/Project.toml index f9cabdd..6dbd1bc 100644 --- a/Project.toml +++ b/Project.toml @@ -16,11 +16,10 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" AsteroidShapeModels = "0.3.1" CairoMakie = "0.13.4" Downloads = "1.6.0" -LinearAlgebra = "1.11.0" Rotations = "1.7.1" SPICE = "0.2.3" StaticArrays = "1.9.8" -julia = "1.11" +julia = "1.10" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"