Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

test build on ubuntu-24.04 #328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 43 additions & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,57 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
os: [ubuntu-24.04]
python-version: [3.11]

runs-on: ${{ matrix.os }}

name: Build ${{ matrix.os }} executable
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip install poetry
- name: Get packages via poetry
run: poetry install
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip install poetry
- name: Get packages via poetry
run: poetry install

- name: Get CVAmp version number
uses: SebRollen/toml-action@v1.0.0
id: read_toml
with:
file: 'pyproject.toml'
field: 'tool.poetry.version'
- name: Get CVAmp version number
uses: SebRollen/toml-action@v1.0.0
id: read_toml
with:
file: "pyproject.toml"
field: "tool.poetry.version"

- name: Create date and file name env variable
shell: bash
run: |
export today=$(date +'%Y%m%d')
if [ "$RUNNER_OS" == "Windows" ]; then
echo "output_filename=CVAmp${{steps.read_toml.outputs.value}}_${today}_${{runner.os}}-${{runner.arch}}" >> $GITHUB_ENV
else
echo "output_filename=CVAmp${{steps.read_toml.outputs.value}}_${today}_${{runner.os}}-${{runner.arch}}_experimental" >> $GITHUB_ENV
fi
- name: Create date and file name env variable
shell: bash
run: |
export today=$(date +'%Y%m%d')
if [ "$RUNNER_OS" == "Windows" ]; then
echo "output_filename=CVAmp${{steps.read_toml.outputs.value}}_${today}_${{runner.os}}-${{runner.arch}}" >> $GITHUB_ENV
else
echo "output_filename=CVAmp${{steps.read_toml.outputs.value}}_${today}_${{runner.os}}-${{runner.arch}}_experimental" >> $GITHUB_ENV
fi

- name: Build executable
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
poetry run pyinstaller main_gui.py --onefile --add-binary "cvamp_logo.ico;." --add-binary "pyproject.toml;." --icon cvamp_logo.ico --name ${{env.output_filename}}
else
poetry run pyinstaller main_gui.py --onefile --add-binary "cvamp_logo.ico:." --hidden-import=tkinter --add-binary "pyproject.toml:." --icon cvamp_logo.ico --name ${{env.output_filename}}.bin
fi
mv ./proxy/ ./dist/
- name: Build executable
shell: bash
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
poetry run pyinstaller main_gui.py --onefile --add-binary "cvamp_logo.ico;." --add-binary "pyproject.toml;." --icon cvamp_logo.ico --name ${{env.output_filename}}
else
poetry run pyinstaller main_gui.py --onefile --add-binary "cvamp_logo.ico:." --hidden-import=tkinter --add-binary "pyproject.toml:." --icon cvamp_logo.ico --name ${{env.output_filename}}.bin
fi
mv ./proxy/ ./dist/

- name: Zip executable
uses: vimtor/action-zip@v1
with:
files: dist/
dest: ${{env.output_filename}}.zip
- name: Zip executable
uses: vimtor/action-zip@v1
with:
files: dist/
dest: ${{env.output_filename}}.zip

- name: Upload zipped artifact ${{ matrix.os }}
uses: actions/upload-artifact@v4
with:
name: ${{env.output_filename}}
path: ${{env.output_filename}}.zip
- name: Upload zipped artifact ${{ matrix.os }}
uses: actions/upload-artifact@v4
with:
name: ${{env.output_filename}}
path: ${{env.output_filename}}.zip
Loading