Skip to content

CI

CI #21

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
tags:
- v*
- pre-rel-*
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: CI
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: true
matrix:
os:
- ubuntu
- windows
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.71.0
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo tree --locked
# Temporary remove for faster testing
# - run: cargo fmt --all -- --check
# - run: cargo clippy --all-targets --all-features --workspace -- -D warnings
# - run: cargo test --all-features --workspace
- name: Release Build
if: startsWith(github.ref, 'refs/tags/')
run: cargo build --workspace --release
- name: Move descriptor
run: mv conf/ya-dummy-ai.json target/release/ya-dummy-ai.json
- name: Pack
id: pack
shell: bash
env:
OS_NAME: ${{ matrix.os }}
GITHUB_REF: ${{ github.ref }}
run: |
bash .ci/pack-build.sh
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: |
releases/golem-runtime-${{ matrix.os }}-${{ github.ref }}.*
releases/golem-framework-${{ matrix.os }}-${{ github.ref }}.*
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre-rel-v') }}