Repository navigation
fix(interleaver): restore bounds check in workingEntries loop #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: Build and Release | |
| on: [ push, pull_request ] | |
| jobs: | |
| build-windows: | |
| name: Build Windows binaries | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@main | |
| - name: Build and package xa-interleaver | |
| run: | | |
| $vsPath = vswhere -latest -property installationPath | |
| Import-Module "$vsPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" | |
| Enter-VsDevShell -VsInstallPath $vsPath -Arch amd64 -SkipAutomaticLocation | |
| @('xa-interleaver.cxx','xa-deinterleaver.cxx') | ForEach-Object { (Get-Content $_ -Raw) -replace 'VERSION', "${{ github.ref_name }}" | Set-Content $_ -NoNewline } | |
| cl /std:c++17 /O2 /EHsc /Fexa-interleaver xa-interleaver.cxx | |
| cl /std:c++17 /O2 /EHsc /Fexa-deinterleaver xa-deinterleaver.cxx | |
| Compress-Archive -Path example.csv,xa-interleaver.exe,xa-deinterleaver.exe -DestinationPath xa-interleaver-${{ github.ref_name }}-windows.zip | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: windows | |
| path: | | |
| xa-interleaver-${{ github.ref_name }}-windows.zip | |
| build-linux: | |
| name: Build Linux binaries | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@main | |
| - name: Build and package xa-interleaver | |
| run: | | |
| for file in xa-interleaver.cxx xa-deinterleaver.cxx; do perl -pi -e "s/VERSION/${{ github.ref_name }}/g" "$file"; done | |
| clang++ -std=c++17 -O2 -o xa-interleaver xa-interleaver.cxx | |
| clang++ -std=c++17 -O2 -o xa-deinterleaver xa-deinterleaver.cxx | |
| zip xa-interleaver-${{ github.ref_name }}-linux.zip example.csv xa-interleaver xa-deinterleaver | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: linux | |
| path: | | |
| xa-interleaver-${{ github.ref_name }}-linux.zip | |
| build-macos: | |
| name: Build macOS binaries | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@main | |
| - name: Build and package xa-interleaver | |
| run: | | |
| for file in xa-interleaver.cxx xa-deinterleaver.cxx; do perl -pi -e "s/VERSION/${{ github.ref_name }}/g" "$file"; done | |
| clang++ -arch x86_64 -arch arm64 -mmacos-version-min=10.15 -std=c++17 -O2 -o xa-interleaver xa-interleaver.cxx | |
| clang++ -arch x86_64 -arch arm64 -mmacos-version-min=10.15 -std=c++17 -O2 -o xa-deinterleaver xa-deinterleaver.cxx | |
| zip xa-interleaver-${{ github.ref_name }}-macos.zip example.csv xa-interleaver xa-deinterleaver | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: macos | |
| path: | | |
| xa-interleaver-${{ github.ref_name }}-macos.zip | |
| # This job takes care of creating a new release and upload the build | |
| # artifacts if the last commit is associated to a tag. | |
| create-release: | |
| name: Create release | |
| runs-on: ubuntu-latest | |
| needs: [ build-windows, build-linux, build-macos ] | |
| steps: | |
| - name: Fetch build artifacts | |
| if: ${{ github.ref_type == 'tag' }} | |
| uses: actions/download-artifact@main | |
| - name: Publish release | |
| if: ${{ github.ref_type == 'tag' }} | |
| uses: softprops/action-gh-release@master | |
| with: | |
| fail_on_unmatched_files: true | |
| generate_release_notes: true | |
| files: | | |
| windows/* | |
| linux/* | |
| macos/* |