Skip to content

Commit

Permalink
Merge branch 'develop' into publish-gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Jan 28, 2025
2 parents 1bd4ad2 + 86da9ca commit 99182b6
Show file tree
Hide file tree
Showing 81 changed files with 2,851 additions and 2,495 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/phono3py-pytest-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pytest on macOS

on:
push:
branches:
- macos

jobs:
build-macos:
runs-on: macos-latest
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4
- name: Install phono3py
run: |
pip install -e . -v
- name: Run pytest
run: |
pip install pytest
pytest -v test
26 changes: 26 additions & 0 deletions .github/workflows/phono3py-pytest-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pytest on windows

on:
push:
branches:
- windows

jobs:
build-windows:
runs-on: windows-latest
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4
- name: Install phonopy
run: |
pip install git+https://github.com/phonopy/phonopy@develop
- name: Install phono3py
run: |
pip install -e . -v
- name: Run pytest
run: |
pip install pytest
pytest -v test
57 changes: 35 additions & 22 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
name: wheel-build-and-deploy

on:
push:
branches:
- make-wheel
- make-wheel-test
push:
branches:
- make-wheel
- make-wheel-test

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest,]
# os: [ubuntu-latest, windows-latest, macos-13, macos-latest]

os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
# os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -25,17 +24,37 @@ jobs:
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.22.0

- name: Build wheels
- name: Build wheels on ubuntu
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
git tag v`grep __version__ phono3py/version.py|awk -F'"' '{print($2)}'`
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "cp39-* pp* *_i686 *musllinux*"
CIBW_BUILD_VERBOSITY: 1

# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value
- name: Build wheels on macos
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
git tag v`grep __version__ phono3py/version.py|awk -F'"' '{print($2)}'`
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "cp39-* pp*"
# CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_BUILD_VERBOSITY: 1

- name: Build wheels on windows
if: ${{ startsWith(matrix.os, 'windows') }}
run: |
$version = Select-String -Path "phono3py\version.py" -Pattern '__version__' | ForEach-Object {
($_ -split '"')[1]
}
git tag "v$version"
Write-Output "The value of version is: $version"
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: "cp39-* pp*"
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v4
with:
Expand All @@ -44,12 +63,9 @@ jobs:

upload_pypi_test:
name: Upload to PyPI (test)
strategy:
matrix:
os: [ubuntu-latest,]
needs: [build_wheels,]
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/make-wheel-test')
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/make-wheel-test' }}
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -60,17 +76,14 @@ jobs:
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
skip-existing: true

upload_pypi:
name: Upload to PyPI
strategy:
matrix:
os: [ubuntu-latest,]
needs: [build_wheels,]
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/make-wheel')
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/make-wheel' }}
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
exclude: ^example/AlN-LDA/

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
rev: v0.9.2
hooks:
- id: ruff
args: [ "--fix", "--show-fixes" ]
Expand Down
Loading

0 comments on commit 99182b6

Please sign in to comment.