Skip to content

Commit

Permalink
added macos arm to github action
Browse files Browse the repository at this point in the history
  • Loading branch information
u3dreal committed Nov 26, 2024
1 parent 8c85a4c commit ec29acf
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,36 @@ jobs:
name: molecular-plus_${{ env.VERSION }}_310_macos
path: ./molecular-plus_${{ env.VERSION }}_310_macos.zip

build_macos_arm64:
runs-on: macos-13
outputs:
VERSION: ${{ steps.build.outputs.VERSION }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10.12
uses: actions/setup-python@v3
with:
python-version: 3.10.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest cython
- name: Lint with flake8
run: |
flake8 . --count --exit-zero --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build with Cython
id: build
run: |
version=$(python pack_molecular_arm64.py)
echo "VERSION=${version}" >> $GITHUB_ENV
echo "::set-output name=VERSION::${version}"
- name: Upload mac zip
uses: actions/upload-artifact@v3
with:
name: molecular-plus_${{ env.VERSION }}_310_macos_arm64
path: ./molecular-plus_${{ env.VERSION }}_310_macos_arm64.zip

build_macos41:
runs-on: macos-13
outputs:
Expand Down Expand Up @@ -189,6 +219,36 @@ jobs:
name: molecular-plus_${{ env.VERSION }}_311_macos
path: ./molecular-plus_${{ env.VERSION }}_311_macos.zip

build_macos41_arm64:
runs-on: macos-13
outputs:
VERSION: ${{ steps.build.outputs.VERSION }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11.7
uses: actions/setup-python@v3
with:
python-version: 3.11.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest cython
- name: Lint with flake8
run: |
flake8 . --count --exit-zero --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build with Cython
id: build
run: |
version=$(python pack_molecular_arm64.py)
echo "VERSION=${version}" >> $GITHUB_ENV
echo "::set-output name=VERSION::${version}"
- name: Upload mac zip
uses: actions/upload-artifact@v3
with:
name: molecular-plus_${{ env.VERSION }}_311_macos_arm64
path: ./molecular-plus_${{ env.VERSION }}_311_macos_arm64.zip

release:
runs-on: ubuntu-latest
needs:
Expand All @@ -197,7 +257,9 @@ jobs:
- build_linux
- build_linux41
- build_macos
- build_macos_arm64
- build_macos41
- build_macos41_arm64
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout code
Expand Down Expand Up @@ -232,11 +294,21 @@ jobs:
with:
name: molecular-plus_${{ needs.build_macos.outputs.VERSION }}_310_macos

- name: Download artifacts for macOS 310 arm64
uses: actions/download-artifact@v3
with:
name: molecular-plus_${{ needs.build_macos.outputs.VERSION }}_310_macos_arm64

- name: Download artifacts for macOS 311
uses: actions/download-artifact@v3
with:
name: molecular-plus_${{ needs.build_macos41.outputs.VERSION }}_311_macos

- name: Download artifacts for macOS 311 arm64
uses: actions/download-artifact@v3
with:
name: molecular-plus_${{ needs.build_macos41.outputs.VERSION }}_311_macos_arm64

- name: Create Release
run: |
tag=${GITHUB_REF#refs/tags/}
Expand All @@ -245,8 +317,10 @@ jobs:
molecular-plus_${{ needs.build_windows41.outputs.VERSION }}_311_win.zip \
molecular-plus_${{ needs.build_linux.outputs.VERSION }}_310_linux.zip \
molecular-plus_${{ needs.build_linux41.outputs.VERSION }}_311_linux.zip \
molecular-plus_${{ needs.build_macos.outputs.VERSION }}_310_macos_arm64.zip \
molecular-plus_${{ needs.build_macos.outputs.VERSION }}_310_macos.zip \
molecular-plus_${{ needs.build_macos41.outputs.VERSION }}_311_macos.zip \
molecular-plus_${{ needs.build_macos41.outputs.VERSION }}_311_macos_arm64.zip \
--title "Release $tag" \
--notes "Release of version $tag"
env:
Expand Down

0 comments on commit ec29acf

Please sign in to comment.