Add CHANGELOG, LICENSE, README, setup.py, and GitHub workflows for im… #1
This file contains hidden or 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: Test Build | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| test-build: | |
| name: Test Build ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install -r requirements.txt | |
| pip install pyinstaller | |
| - name: Run tests | |
| run: make test | |
| - name: Test PyInstaller build | |
| shell: bash | |
| run: | | |
| # Set platform-specific variables for testing | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| export OS="Windows_NT" | |
| else | |
| export OS="Linux" | |
| fi | |
| # Test that build command works | |
| make build | |
| # Test that the binary was created | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| test -f dist/imgc.exe | |
| ./dist/imgc.exe --help | |
| else | |
| test -f dist/imgc | |
| chmod +x dist/imgc | |
| ./dist/imgc --help | |
| fi | |
| - name: Upload test artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-build-${{ matrix.os }} | |
| path: dist/ | |
| retention-days: 1 |