Upgrade to tantivy v0.22.0-dev (#524) #70
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow | |
name: build-and-upload-artifacts | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-and-upload-artifacts: | |
name: Building and uploading artifacts | |
runs-on: ${{ matrix.runner_os }} | |
strategy: | |
matrix: | |
target: | |
- x86_64-unknown-linux-musl | |
- x86_64-apple-darwin | |
- x86_64-pc-windows-msvc | |
include: | |
- target: x86_64-apple-darwin | |
runner_platform: x86_64-apple-darwin | |
runner_os: macos-latest | |
- target: x86_64-unknown-linux-musl | |
runner_platform: x86_64-unknown-linux-gnu | |
runner_os: ubuntu-latest | |
- target: x86_64-pc-windows-msvc | |
runner_platform: x86_64-pc-windows-msvc | |
runner_os: windows-latest | |
executable_suffix: .exe | |
steps: | |
- name: Install dependencies for `musl libc` on Linux | |
if: matrix.target == 'x86_64-unknown-linux-musl' | |
run: | | |
sudo apt -y install musl-tools | |
# See also: <https://github.com/rusqlite/rusqlite/blob/master/.github/workflows/main.yml> | |
- name: Add LLVM path on Windows | |
if: runner.os == 'Windows' | |
run: | | |
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install Rust toolchains for both native target and WASM | |
uses: dsherret/rust-toolchain-file@v1 | |
- name: Cache Rust toolchain and build artifacts | |
uses: Swatinem/rust-cache@v2 | |
with: | |
# Distinguished by the action name to avoid sharing across different actions! | |
shared-key: "build-and-upload-artifacts" | |
- name: Install Trunk for building the webapp | |
run: | | |
cargo install --locked trunk | |
- name: Install just | |
uses: extractions/setup-just@v2 | |
- name: Build ofdb-app-clearance | |
run: just build-clearance | |
- name: Build server executable | |
run: | | |
cargo build --locked --all-features --profile production --target ${{ matrix.target }} | |
- name: Upload tagged release artifact | |
id: upload-tagged-release-artifact | |
# Only triggered by version tags that start with 'v' | |
if: startsWith(github.ref, 'refs/tags/v') && startsWith(github.event.release.tag_name, 'v') | |
uses: actions/upload-artifact@v4 | |
with: | |
# Artifact is stored and downloaded as .zip archive | |
name: openfairdb_${{ github.event.release.tag_name }}_${{ matrix.target }}${{ matrix.executable_suffix }} | |
path: target/${{ matrix.target }}/production/openfairdb${{ matrix.executable_suffix }} | |
- name: Upload untagged artifact | |
if: steps.upload-tagged-release-artifact.outcome == 'skipped' | |
uses: actions/upload-artifact@v4 | |
with: | |
# Artifact is stored and downloaded as .zip archive | |
name: openfairdb_${{ github.sha }}_${{ matrix.target }}${{ matrix.executable_suffix }} | |
path: target/${{ matrix.target }}/production/openfairdb${{ matrix.executable_suffix }} |