This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
add instruction to run/build from source into readme #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python application | |
on: | |
push: | |
branches: [ "dev" ] | |
defaults: | |
run: | |
shell: bash | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
pip install -r requirements.txt | |
- name: Build | |
run: | | |
bash semver.sh | |
pyinstaller -y decoder.spec | |
- name: Linux rename | |
if: runner.os == 'Linux' | |
run: mv dist/GeoscanDecoder dist/GeoscanDecoder_linux | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: GeoscanDecoder_${{ matrix.os }} | |
path: dist/* | |
build7: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.7" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
pip install -r requirements.txt | |
- name: Build | |
run: | | |
bash semver.sh | |
pyinstaller -y decoder.spec | |
mv dist/GeoscanDecoder.exe dist/GeoscanDecoder_win7.exe | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: GeoscanDecoder_win7 | |
path: dist/* | |
nightly_release: | |
runs-on: ubuntu-latest | |
needs: ["build", "build7"] | |
steps: | |
- uses: actions/download-artifact@v3 | |
- name: Collect | |
run: | | |
mkdir out && | |
cp GeoscanDecoder_*/* out/ | |
- name: Cleanup | |
continue-on-error: true | |
run: gh release delete nightly -R ${{ github.repository }} --cleanup-tag -y | |
- name: Create nightly release | |
run: gh release create nightly -R ${{ github.repository }} -t nightly --target dev --generate-notes --prerelease out/* |