Merge branch 'develop' into fix-offline-resolve-templates #539
Workflow file for this run
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
name: Build PROS CLI | |
on: | |
push: | |
pull_request: | |
jobs: | |
update_build_number: | |
runs-on: ubuntu-latest | |
outputs: | |
output1: ${{ steps.step1.outputs.test }} | |
steps: | |
- uses: actions/checkout@v3.1.0 | |
with: | |
fetch-depth: 0 | |
- name: Update Build Number | |
id: step1 | |
run: | | |
git describe --tags | |
git clean -f | |
python3 version.py | |
echo "::set-output name=test::$(cat version)" | |
build: | |
needs: update_build_number | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v3.1.0 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4.3.0 | |
with: | |
python-version: 3.9 | |
cache: 'pip' | |
if: matrix.os != 'macos-latest' | |
- name: Setup Python MacOS | |
run: | | |
wget https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg | |
sudo installer -verbose -pkg ./python-3.10.11-macos11.pkg -target / | |
echo "/Library/Frameworks/Python.framework/Versions/3.10/bin" >> $GITHUB_PATH | |
if: matrix.os == 'macos-latest' | |
- name: Install Requirements | |
run: python3 -m pip install --upgrade pip && pip3 install wheel && pip3 install -r requirements.txt && pip3 uninstall -y typing | |
- name: Build Wheel | |
run: python3 setup.py bdist_wheel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Upload Wheel | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
name: pros-cli-wheel-${{needs.update_build_number.outputs.output1}} | |
path: dist/* | |
if: matrix.os == 'ubuntu-latest' | |
- name: Run Pyinstaller | |
run: | | |
python3 version.py | |
pyinstaller pros.spec | |
pyinstaller --onefile pros/cli/compile_commands/intercept-cc.py --name=intercept-cc | |
pyinstaller --onefile pros/cli/compile_commands/intercept-cc.py --name=intercept-c++ | |
if: matrix.os != 'macos-latest' | |
- name: Run Pyinstaller MacOS | |
run: | | |
pip3 uninstall -y charset_normalizer | |
git clone https://github.com/Ousret/charset_normalizer.git | |
pip3 install -e ./charset_normalizer | |
python3 version.py | |
pyinstaller pros-macos.spec | |
pyinstaller --onefile pros/cli/compile_commands/intercept-cc.py --name=intercept-cc --target-arch=universal2 | |
pyinstaller --onefile pros/cli/compile_commands/intercept-cc.py --name=intercept-c++ --target-arch=universal2 | |
if: matrix.os == 'macos-latest' | |
- name: Package Everything Up | |
shell: bash | |
run: | | |
cd dist/ | |
mv intercept-cc pros | |
mv intercept-c++ pros | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3.1.0 | |
with: | |
name: ${{ matrix.os }}-${{needs.update_build_number.outputs.output1}} | |
path: dist/* |