Skip to content

Exports viewer -> exports editor. #61

Exports viewer -> exports editor.

Exports viewer -> exports editor. #61

name: Build and test windows
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
node-version: [ 20.x ]
steps:
- uses: davidB/rust-cargo-make@v1
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: bin/xrf-ui/package-lock.json
- uses: Swatinem/rust-cache@v2
- name: Run formatter
run: cargo fmt --all -- --check
- name: Run xray crates tests
run: cargo test --verbose -p xray-db xray-ltx
- name: Build CLI
run: cargo make build-cli-release
- name: Upload CLI build artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: xrf-cli
path: target/release/xrf-cli.exe
retention-days: 1
- name: Install tauri CLI
run: cargo install tauri-cli --version="2.0.0-rc.6" --locked
- name: Build application
run: cargo make build-app-release
- name: Upload application build artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: xrf-app
path: target/release/xrf-app.exe
retention-days: 1
upload-nightly:
if: ${{ github.ref_name == 'main' && github.event_name != 'pull_request' }}
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update nightly tag
uses: EndBug/latest-tag@latest
id: update-nightly-tag
with:
ref: nightly
- uses: actions/download-artifact@v4
with:
name: xrf-cli
- name: Publish nightly cli build
if: ${{ steps.update-nightly-tag.outcome == 'success' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload --clobber nightly xrf-cli.exe
- uses: actions/download-artifact@v4
with:
name: xrf-app
- name: Publish nightly application build
if: ${{ steps.update-nightly-tag.outcome == 'success' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload --clobber nightly xrf-app.exe