Skip to content

Commit

Permalink
support julia 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
宋家豪 authored and thautwarm committed Sep 8, 2023
1 parent 6747156 commit 5ec5f7d
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 7 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/test-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# This is a basic workflow to help you get started with Actions

name: Test-Nightly

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
name: ${{ matrix.OS }} - Julia ${{ matrix.julia-version }} - Python ${{ matrix.python-version }} - ${{ github.event_name }}
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: ['nightly']
OS: [Ubuntu, macOS, Windows]
python-version: ["3.7"]
include:
- os: Ubuntu
image: ubuntu-22.04
- os: Windows
image: windows-2022
- os: macOS
image: macos-12
fail-fast: false
defaults:
run:
shell: bash

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4.2.0
with:
python-version: ${{ matrix.python-version }}

# Runs a single command using the runners shell
- name: insatll jnumpy
run: python -m pip install .

# Runs a single command using the runners shell
- name: pip insatll
run: python -m pip install pytest find_libpython poetry

- name: find python dll
run: echo "TYPY_PY_DLL=$(python -m find_libpython)" >> $GITHUB_ENV

- run: bash ./build.sh

- name: Setup Julia environment
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}

- uses: actions/cache@v1
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 }}-
- name: run pytest test_core.py
run: python -m pytest jnumpy/tests/test_core.py

- name: run pytest test_fast_init.py
run: python -m pytest jnumpy/tests/test_fast_init.py

- name: Run Julia package tests
uses: julia-actions/julia-runtest@v1
with:
project: ./TyPython

- uses: julia-actions/julia-processcoverage@v1
with:
directories: ./TyPython/src
- uses: codecov/codecov-action@v2
with:
files: lcov.info
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a basic workflow to help you get started with Actions

name: CI
name: Test

# Controls when the workflow will run
on:
Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: ["1.6", "1.7"]
julia-version: ["1.6", "1.9"]
OS: [Ubuntu, macOS, Windows]
python-version: ["3.7"]
include:
Expand All @@ -44,20 +44,20 @@ jobs:
uses: actions/setup-python@v4.2.0
with:
python-version: ${{ matrix.python-version }}

# Runs a single command using the runners shell
- name: insatll jnumpy
run: python -m pip install .

# Runs a single command using the runners shell
- name: pip insatll
run: python -m pip install pytest find_libpython poetry

- name: find python dll
run: echo "TYPY_PY_DLL=$(python -m find_libpython)" >> $GITHUB_ENV

- run: bash ./build.sh

- name: Setup Julia environment
uses: julia-actions/setup-julia@v1
with:
Expand Down
1 change: 0 additions & 1 deletion jnumpy/InitTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import UUIDs
@nospecialize

function check_if_typython_installed(typython_dir::AbstractString)
VERSION >= v"1.9" && error("Support for Julia 1.9 is coming soon.")
VERSION < v"1.6" && error("TyPython works for Julia >= 1.6!")
CTX = Pkg.API.Context()
uuid_TyPython = UUIDs.UUID("9c4566a2-237d-4c69-9a5e-9d27b7d0881b")
Expand Down

0 comments on commit 5ec5f7d

Please sign in to comment.