Skip to content

Ini->Ltx. Removed unused feature flagged functionality. Moved unit te… #27

Ini->Ltx. Removed unused feature flagged functionality. Moved unit te…

Ini->Ltx. Removed unused feature flagged functionality. Moved unit te… #27

name: Build and test
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-db tests
run: cargo test --verbose -p xray-db
- 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="1.5.10" --locked
- name: Build application
run: cargo make build-application-release
- name: Upload application build artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: xrf-application
path: target/release/xrf-application.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-application
- 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-application.exe