Skip to content

Commit

Permalink
updated action versions on both Actions workflows; refactored pyinsta…
Browse files Browse the repository at this point in the history
…ller.yml to match download-artifact V4
  • Loading branch information
GuyTeichman committed Sep 16, 2024
1 parent 3298d99 commit 020e850
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 124 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- name: Configure pagefile
if: runner.os == 'Windows'
uses: al-cheb/configure-pagefile-action@v1.2
uses: al-cheb/configure-pagefile-action@v1

- name: Set up pagefile
if: runner.os == 'Windows'
Expand All @@ -44,18 +44,17 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ runner.temp }}/llvm
key: llvm-9
key: llvm
- name: Install LLVM and Clang
if: runner.os != 'macOS'
uses: KyleMayes/install-llvm-action@v1
uses: KyleMayes/install-llvm-action@v2
with:
version: "9.0"
directory: ${{ runner.temp }}/llvm
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3' # The R version to download (if necessary) and use.
r-version: '4.4' # The R version to download (if necessary) and use.
- name: Install homebrew on Linux
if: runner.os == 'Linux'
uses: Homebrew/actions/setup-homebrew@master
Expand Down Expand Up @@ -119,7 +118,7 @@ jobs:
bowtie2 --version
bowtie2-build-s --version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
256 changes: 138 additions & 118 deletions .github/workflows/pyinstaller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,44 +15,49 @@ jobs:
name: Create Release
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.VID_CHECKSUM_PAT }}
persist-credentials: true
- name: Install dev requirements
run: python -m pip install --upgrade -r requirements_dev.txt
- name: Calculate checksums
run: python packaging/checksum_videos.py
- name: Generate Changelog
run: python packaging/generate_changelog.py
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Calculate quick-start video checksums and generate changelog
file_pattern: 'rnalysis/gui/videos/checksums/*.txt rnalysis/data_files/latest_changelog.md'
branch: master
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Stable release ${{ github.ref_name }}
body_path: rnalysis/data_files/latest_changelog.md
draft: false
prerelease: false
- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- name: Save Release URL File for publish
uses: actions/upload-artifact@v4
with:
name: release_url
path: release_url.txt
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.VID_CHECKSUM_PAT }}
persist-credentials: true

- name: Install dev requirements
run: python -m pip install --upgrade -r requirements_dev.txt

- name: Calculate checksums
run: python packaging/checksum_videos.py

- name: Generate Changelog
run: python packaging/generate_changelog.py

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Calculate quick-start video checksums and generate changelog
file_pattern: 'rnalysis/gui/videos/checksums/*.txt rnalysis/data_files/latest_changelog.md'
branch: master

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Stable release ${{ github.ref_name }}
body_path: rnalysis/data_files/latest_changelog.md
draft: false
prerelease: false

- name: Output Release URL File
run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt

- name: Save Release URL File for publish
uses: actions/upload-artifact@v4
with:
name: release_url
path: release_url.txt

build:
name: Build packages
Expand All @@ -61,86 +66,101 @@ jobs:
strategy:
matrix:
include:
- os: macos-13
TARGET: macos
CMD_BUILD: >
pyinstaller RNAlysis.spec &&
cd dist/ &&
zip -r RNAlysis-4.1.0_macos.zip ./RNAlysis* &&
ls -ltr
OUT_FILE_NAME: RNAlysis-4.1.0_macos.zip
ASSET_MIME: application/zip
- os: macos-latest
TARGET: macos-M1
CMD_BUILD: >
pyinstaller RNAlysis.spec &&
cd dist/ &&
zip -r RNAlysis-4.1.0_macos_M1.zip ./RNAlysis* &&
ls -ltr
OUT_FILE_NAME: RNAlysis-4.1.0_macos_M1.zip
ASSET_MIME: application/zip
- os: windows-latest
TARGET: windows
CMD_BUILD: >
pyinstaller RNAlysis.spec &&
cd dist/ &&
7z a RNAlysis-4.1.0_windows.zip -r "RNAlysis-4.1.0/"
OUT_FILE_NAME: RNAlysis-4.1.0_windows.zip
ASSET_MIME: application/zip
- os: macos-13
TARGET: macos
CMD_BUILD: >
pyinstaller RNAlysis.spec &&
cd dist/ &&
zip -r RNAlysis-4.1.0_macos.zip ./RNAlysis* &&
ls -ltr
OUT_FILE_NAME: RNAlysis-4.1.0_macos.zip
ASSET_MIME: application/zip

- os: macos-latest
TARGET: macos-M1
CMD_BUILD: >
pyinstaller RNAlysis.spec &&
cd dist/ &&
zip -r RNAlysis-4.1.0_macos_M1.zip ./RNAlysis* &&
ls -ltr
OUT_FILE_NAME: RNAlysis-4.1.0_macos_M1.zip
ASSET_MIME: application/zip

- os: windows-latest
TARGET: windows
CMD_BUILD: >
pyinstaller RNAlysis.spec &&
cd dist/ &&
7z a RNAlysis-4.1.0_windows.zip -r "RNAlysis-4.1.0/"
OUT_FILE_NAME: RNAlysis-4.1.0_windows.zip
ASSET_MIME: application/zip

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: brew update (macOS)
if: runner.os == 'MacOS'
run: brew update
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
with:
macos-skip-brew-update: 'true' # defalt false
- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v2
with:
path: ${{ runner.temp }}/llvm
key: llvm-9
- name: Install LLVM and Clang
if: runner.os != 'macOS'
uses: KyleMayes/install-llvm-action@v1
with:
version: "9.0"
directory: ${{ runner.temp }}/llvm
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: command line tools on MacOS
if: runner.os == 'macOS'
run: |
gcc -v -xc++ /dev/null -fsyntax-only
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12
cache: 'pip'
- name: Install PyInstaller requirements
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade -r requirements_pyinstaller.txt
- name: Install dependencies
run: python -m pip install .[all]
- name: Build with pyinstaller for ${{matrix.TARGET}}
run: ${{matrix.CMD_BUILD}}
- name: Load Release URL File from release job
uses: actions/download-artifact@v4
with:
name: release_url
- name: Get Release File Name & Upload URL
id: get_release_info
shell: bash
run: |
value=`cat release_url/release_url.txt`
echo ::set-output name=upload_url::$value
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./dist/${{ matrix.OUT_FILE_NAME}}
- name: Checkout repository
uses: actions/checkout@v4

- name: brew update (macOS)
if: runner.os == 'MacOS'
run: brew update

- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
with:
macos-skip-brew-update: 'true'

- name: Cache LLVM and Clang
id: cache-llvm
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/llvm
key: llvm

- name: Install LLVM and Clang
if: runner.os != 'macOS'
uses: KyleMayes/install-llvm-action@v2
with:
directory: ${{ runner.temp }}/llvm
cached: ${{ steps.cache-llvm.outputs.cache-hit }}

- name: command line tools on MacOS
if: runner.os == 'macOS'
run: |
gcc -v -xc++ /dev/null -fsyntax-only
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
cache: 'pip'

- name: Install PyInstaller requirements
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade -r requirements_pyinstaller.txt
- name: Install dependencies
run: python -m pip install .[all]

- name: Build with pyinstaller for ${{ matrix.TARGET }}
run: ${{ matrix.CMD_BUILD }}

- name: Load Release URL File from release job
uses: actions/download-artifact@v4
with:
name: release_url
path: release_url

- name: Get Release File Name & Upload URL
id: get_release_info
run: |
value=$(cat release_url/release_url.txt)
echo "UPLOAD_URL=$value" >> $GITHUB_ENV
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./dist/${{ matrix.OUT_FILE_NAME }}
name: ${{ matrix.OUT_FILE_NAME }}

0 comments on commit 020e850

Please sign in to comment.