Publish Nightly #174
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 Nightly | |
on: | |
workflow_dispatch: | |
env: | |
QSV_KIND: prebuilt-nightly | |
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: [nightly-2024-11-28] | |
job: | |
- os: ubuntu-24.04 | |
os-name: linux | |
target: x86_64-unknown-linux-gnu | |
architecture: x86_64 | |
addl-build-args: --features=apply,luau,fetch,foreach,nightly,self_update,geocode,polars,to,lens,prompt | |
default-features: | |
addl-qsvlite-features: | |
addl-qsvdp-features: luau,polars | |
addl-rustflags: -C target-feature=+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+avx2,+fma,+bmi1,+bmi2,+lzcnt,+pclmulqdq | |
# - os: ubuntu-22.04 | |
# os-name: linux | |
# target: x86_64-unknown-linux-musl | |
# architecture: x86_64 | |
# musl-prep: true | |
# addl-build-args: --features=apply,fetch,foreach,nightly,self_update | |
# default-features: | |
- os: windows-latest | |
os-name: windows | |
target: x86_64-pc-windows-msvc | |
architecture: x86_64 | |
addl-build-args: --features=apply,luau,fetch,nightly,self_update,polars,geocode,to,lens,prompt | |
default-features: | |
addl-qsvlite-features: | |
addl-qsvdp-features: luau | |
addl-rustflags: -C target-feature=+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+avx2,+fma,+bmi1,+bmi2,+lzcnt,+pclmulqdq | |
# - os: windows-latest | |
# os-name: windows | |
# target: x86_64-pc-windows-gnu | |
# architecture: x86_64 | |
# addl-build-args: --features=apply,luau,fetch,nightly,self_update,polars | |
# default-features: --no-default-features | |
# addl-qsvlite-features: | |
# addl-qsvdp-features: luau | |
# addl-rustflags: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2 | |
- os: macos-latest | |
os-name: macos | |
target: x86_64-apple-darwin | |
architecture: x86_64 | |
addl-build-args: --features=apply,luau,fetch,foreach,nightly,to,self_update,polars,geocode,lens,prompt | |
default-features: | |
addl-qsvlite-features: | |
addl-qsvdp-features: luau | |
addl-rustflags: -C target-feature=+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+avx2,+fma,+bmi1,+bmi2,+lzcnt,+pclmulqdq | |
steps: | |
- name: Installing Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
profile: minimal | |
components: rust-src | |
target: ${{ matrix.job.target }} | |
override: true | |
default: 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: apt-get update Ubuntu, libwayland-dev | |
if: ${{ matrix.job.os-name == 'linux' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install libwayland-dev | |
- uses: actions/[email protected] | |
with: | |
python-version: '3.12' | |
- name: Build qsv-nightly | |
# env: | |
# RUSTFLAGS: --emit=asm | |
env: | |
RUSTFLAGS: ${{ matrix.job.addl-rustflags }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
use-cross: false | |
toolchain: ${{ matrix.rust }} | |
args: --profile release-nightly --bin qsv -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target ${{ matrix.job.target }} ${{ matrix.job.addl-build-args }},feature_capable,nightly ${{ matrix.job.default-features }} | |
- name: Build qsvlite-nightly | |
env: | |
RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
use-cross: false | |
toolchain: ${{ matrix.rust }} | |
args: --profile release-nightly --bin qsvlite -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --features=lite,self_update,nightly,${{ matrix.job.addl-qsvlite-features }} --target ${{ matrix.job.target }} ${{ matrix.job.default-features }} | |
- name: Build qsvdp-nightly | |
env: | |
RUSTFLAGS: --emit=asm ${{ matrix.job.addl-rustflags }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
use-cross: false | |
toolchain: ${{ matrix.rust }} | |
args: --profile release-nightly --bin qsvdp -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --features=datapusher_plus,nightly,${{ 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-nightly/*.d | |
cp target/${{ matrix.job.target }}/release-nightly/qsv* qsv-${{ needs.analyze-tags.outputs.previous-tag }} | |
cd qsv-${{ needs.analyze-tags.outputs.previous-tag }} | |
if [ "$RUNNER_OS" == "Windows"]; then | |
mv qsv.exe qsv_nightly.exe | |
mv qsvlite.exe qsvlite_nightly.exe | |
mv qsvdp.exe qsvdp_nightly.exe | |
else | |
mv qsv qsv_nightly | |
mv qsvlite qsvlite_nightly | |
mv qsvdp qsvdp_nightly | |
fi | |
rustup show > qsv_nightly_rust_version_info.txt | |
cd .. | |
- name: install zipsign | |
run: | | |
cargo install zipsign | |
- name: Fetch zipsign private key | |
uses: mobiledevops/secret-to-file-action@v1 | |
with: | |
base64-encoded-secret: ${{ secrets.QSV_ZIPSIGN_PRIV_KEY }} | |
filename: "qsvpriv.key" | |
is-executable: false | |
working-directory: "." | |
- name: Download latest release zip | |
uses: robinraju/[email protected] | |
with: | |
repository: "dathere/qsv" | |
latest: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fileName: qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip | |
- name: remove zipsign signature from zip archive | |
run: | | |
zipsign unsign zip qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip | |
- name: add/update nightly 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: re-zipsign zip archive | |
run: | | |
zipsign sign zip qsv-${{ needs.analyze-tags.outputs.previous-tag }}-${{ matrix.job.target }}.zip qsvpriv.key | |
- 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 }} | |