Skip to content

Commit

Permalink
Merge pull request #1 from issp-center-dev/update_ci
Browse files Browse the repository at this point in the history
update github actions
  • Loading branch information
yomichi authored Oct 30, 2024
2 parents cf4329f + da98790 commit fc029e2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 23 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ on: [push]

jobs:
check-build-doc:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: main

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11

- name: Prepare LaTeX env
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ on:

jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Inject slug/short variables
uses: rlespinasse/[email protected]

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: main

- name: Checkout gh-pages
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11

- name: Prepare LaTeX env
run: |
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Push
env:
GIT_USER: "2DMAT Developers"
GIT_USER: "ODAT-SE Developers"
GIT_EMAIL: "[email protected]"
TARGET_NAME: ${{ env.GITHUB_REF_SLUG }}
run: |
Expand All @@ -76,7 +76,7 @@ jobs:
mkdir -p "gh-pages/manual/${TARGET_NAME}"
cp -r "main/doc/${lang}/build/html" "gh-pages/manual/${TARGET_NAME}/${lang}"
if [ $is_tag = "YES" ]; then
# cp "main/doc/${lang}/build/latex/userguid_2dmat_${lang}.pdf" "gh-pages/manual/${TARGET_NAME}/${lang}/2DMAT.pdf"
# cp "main/doc/${lang}/build/latex/userguid_odatse_${lang}.pdf" "gh-pages/manual/${TARGET_NAME}/${lang}/ODAT-SE.pdf"
:
fi
done
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/deploy_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ name: upload package to PyPI
on:
push:
# tags: ['*']
tags: ['disabled-because-odatse-is-not-ready-in-pypi']
tags: ['disabled-because-odatse-is-not-yet-ready-in-pypi']

jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11

- name: Install python packages
run: |
Expand Down
25 changes: 18 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
name: Test

on: [push]
on: [push, pull_request]

jobs:
main:
runs-on: ubuntu-20.04
timeout-minutes: 10
strategy:
matrix:
python-version: [3.6, 3.9]
# Python 3.6 is not supported on Ubuntu 22.04
os: ['ubuntu-22.04', 'ubuntu-20.04']
python-version: ['3.6', '3.9', '3.12']
sample: [mapper, minsearch, exchange, exchange_mesh, pamc, bayes, transform]
exclude:
- os: 'ubuntu-22.04'
python-version: '3.6'
- os: 'ubuntu-20.04'
python-version: '3.9'
- os: 'ubuntu-20.04'
python-version: '3.12'
fail-fast: false

name: ${{ matrix.sample }} with Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

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

Expand All @@ -34,7 +45,7 @@ jobs:
python -m pip install numpy scipy tomli mpi4py
python -m pip install physbo
- name: ${{ matrix.algorithm }}
- name: ${{ matrix.sample }}
run: |
cd ${GITHUB_WORKSPACE}/tests/${{ matrix.sample }}
sh ./do.sh

0 comments on commit fc029e2

Please sign in to comment.