rename vm.exe to omvm.exe
#51
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v* | |
| permissions: | |
| contents: write | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v7.2.0 | |
| - name: Install Rust | |
| uses: MatteoH2O1999/setup-rust@v2.1.1 | |
| - name: Lint with ruff | |
| run: uvx ruff check src/omni_compiler/ | |
| - name: Install C compiler | |
| run: sudo apt-get install -y gcc | |
| if: ${{runner.os == 'Linux'}} | |
| - name: Build | |
| run: uv run build_nuitka.py | |
| - name: Copy build artifact per OS (Windows) | |
| if: ${{ runner.os == 'Windows'}} | |
| shell: pwsh | |
| run: | | |
| cp omni.exe omni-windows.exe | |
| cp dist\omvm.exe omvm-windows.exe | |
| cp dist\omvm.exe src\omni_compiler\omvm.exe | |
| - name: Copy build artifact per OS (Linux) | |
| if: ${{ runner.os == 'Linux'}} | |
| run: | | |
| cp omni.bin omni-linux | |
| cp dist/omvm omvm-linux | |
| cp dist/omvm src/omni_compiler/omvm | |
| - name: Copy build artifact per OS (macOS) | |
| if: ${{ runner.os == 'macOS'}} | |
| run: | | |
| cp omni.bin omni-macos | |
| cp dist/omvm omvm-macos | |
| cp dist/omvm src/omni_compiler/omvm | |
| - name: Test with pytest | |
| run: uv run pytest | |
| - name: Upload artifact for release | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: omni-${{ runner.os }} | |
| path: | | |
| ./omni-*.exe | |
| ./omni-* | |
| ./omvm-*.exe | |
| ./omvm-* | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download matrix artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release-artifacts | |
| - name: Copy README.md | |
| run: cp README.md release-artifacts/ | |
| - name: Get tag name | |
| id: tag | |
| run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Get release title | |
| id: title | |
| run: echo "title=$(<RELEASE_TITLE.txt)" >> $GITHUB_OUTPUT | |
| - name: Check if release is a prerelease | |
| id: pre | |
| run: | | |
| if [[ "${{ steps.tag.outputs.tag_name }}" == *"pre"* ]]; then | |
| echo "prerelease=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "prerelease=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.tag.outputs.tag_name }} | |
| name: ${{ steps.title.outputs.title }} | |
| body_path: RELEASE_BODY.md | |
| prerelease: ${{ steps.pre.outputs.prerelease }} | |
| files: release-artifacts/**/* | |
| draft: true | |