Publish glibc 2.31/musl 1.2.3 binaries #11
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: Publish glibc 2.31/musl 1.2.3 binaries | |
on: | |
workflow_dispatch: | |
env: | |
QSV_KIND: prebuilt-older | |
jobs: | |
analyze-tags: | |
runs-on: ubuntu-20.04 | |
outputs: | |
previous-tag: ${{ steps.previoustag.outputs.tag }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
#▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼▼# | |
- name: Get previous tag | |
id: previoustag | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
#▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲▲# | |
publish: | |
name: Publish for ${{ matrix.job.target }} | |
needs: analyze-tags | |
runs-on: ${{ matrix.job.os }} | |
strategy: | |
matrix: | |
rust: [stable] | |
job: | |
- os: ubuntu-20.04 | |
os-name: linux | |
target: x86_64-unknown-linux-gnu | |
architecture: x86_64 | |
addl-build-args: --features=apply,generate,luau,fetch,foreach,self_update,polars,geocode | |
default-features: | |
addl-qsvlite-features: | |
addl-qsvdp-features: luau | |
name-suffix: glibc-2.31 | |
- os: ubuntu-22.04 | |
os-name: linux | |
target: x86_64-unknown-linux-musl | |
architecture: x86_64 | |
musl-prep: true | |
addl-build-args: --features=apply,generate,fetch,foreach,self_update,polars | |
default-features: | |
addl-qsvlite-features: | |
addl-qsvdp-features: | |
name-suffix: musl-1.2.3 | |
steps: | |
- name: Installing Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
profile: minimal | |
target: ${{ matrix.job.target }} | |
override: true | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.analyze-tags.outputs.previous-tag }} | |
- name: build prep for x86_64-unknown-linux-musl | |
if: ${{ matrix.job.musl-prep }} | |
run: | | |
sudo apt-get install musl-tools musl-dev | |
sudo ln -s /usr/bin/g++ /usr/bin/musl-g++ | |
- name: Build qsv | |
env: | |
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
use-cross: ${{ matrix.job.use-cross }} | |
toolchain: ${{ matrix.rust }} | |
args: --release --locked --bin qsv --target ${{ matrix.job.target }} ${{ matrix.job.addl-build-args }},feature_capable ${{ matrix.job.default-features }} | |
- name: Build qsvlite | |
env: | |
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
use-cross: ${{ matrix.job.use-cross }} | |
toolchain: ${{ matrix.rust }} | |
args: --release --locked --bin qsvlite --features=lite,self_update,${{ matrix.job.addl-qsvlite-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }} | |
- name: Build qsvdp | |
env: | |
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
use-cross: ${{ matrix.job.use-cross }} | |
toolchain: ${{ matrix.rust }} | |
args: --release --locked --bin qsvdp --features=datapusher_plus,${{ matrix.job.addl-qsvdp-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }} | |
- name: Copy binaries to working dir | |
shell: bash | |
run: | | |
mkdir qsv-${{ needs.analyze-tags.outputs.previous-tag }} | |
rm target/${{ matrix.job.target }}/release/*.d | |
cp target/${{ matrix.job.target }}/release/qsv* qsv-${{ needs.analyze-tags.outputs.previous-tag }} | |
cd qsv-${{ needs.analyze-tags.outputs.previous-tag }} | |
mv qsv qsv_${{ matrix.job.name-suffix }} | |
mv qsvlite qsvlite_${{ matrix.job.name-suffix }} | |
mv qsvdp qsvdp_${{ matrix.job.name-suffix }} | |
rustup show > qsv_${{ matrix.job.name-suffix }}_rust_version_info.txt | |
cd .. | |
- name: Download latest release zip | |
uses: robinraju/[email protected] | |
with: | |
repository: "jqnatividad/qsv" | |
latest: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fileName: qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip | |
- name: add/update "older" glibc 2.31/musl 1.2.3 files to zip | |
run: 7z u -tzip qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip ./qsv-${{ needs.analyze-tags.outputs.previous-tag }}/qsv* -mx=9 -mmt=on | |
- name: Upload zipped binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip | |
asset_name: qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip | |
overwrite: true | |
tag: ${{ needs.analyze-tags.outputs.previous-tag }} | |