Build #262
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: Build | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '17 3 * * *' | |
push: | |
branches: [ "main" ] | |
paths-ignore: | |
- README.md | |
- .git* | |
pull_request: | |
# The branches below must be a subset of the branches above | |
branches: [ "main" ] | |
paths-ignore: | |
- README.md | |
- .git* | |
jobs: | |
lint: | |
name: SQFLint | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Enable problem matcher | |
run: echo "::add-matcher::.github/matchers/sqf.json" | |
- name: SQFLint | |
uses: arma-actions/sqflint@master | |
continue-on-error: true # No failure due to many false-positives: | |
parse: | |
name: Run SQF parse test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: SQLVM parse test | |
uses: darkwanderer/sqfvm-action@master | |
continue-on-error: true # No failure, experimental run | |
with: | |
command: --input-sqf addons/factions/fnc_initFactions.sqf | |
build-extension-windows-x64: | |
name: Build extension (Windows x64) | |
runs-on: windows-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Init Cargo cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --release | |
- name: Test | |
run: cargo test --release | |
- name: Move library | |
run: move target/release/dynops.dll dynops_x64.dll | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: extension-x64-windows | |
path: dynops_x64.dll | |
retention-days: 1 | |
build-extension-linux-x64: | |
name: Build extension (Linux x64) | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Init Cargo cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --release | |
- name: Test | |
run: cargo test --release | |
- name: Move library | |
run: mv target/release/libdynops.so dynops_x64.so | |
- name: Strip library | |
run: strip --strip-unneeded --keep-file-symbols dynops_x64.so | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: extension-x64-linux | |
path: dynops_x64.so | |
retention-days: 1 | |
build: | |
name: Build addon | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
needs: | |
- build-extension-windows-x64 | |
- build-extension-linux-x64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Windows x64 | |
uses: actions/download-artifact@v4 | |
with: | |
name: extension-x64-windows | |
path: . | |
- name: Download Linux x64 | |
uses: actions/download-artifact@v4 | |
with: | |
name: extension-x64-linux | |
path: . | |
- name: Install HEMTT | |
uses: arma-actions/hemtt@main | |
- name: Run HEMTT build | |
run: hemtt release | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: DynamicOperations | |
path: releases/dynops-latest.zip | |
if-no-files-found: error | |
pre-release: | |
name: Publish pre-release | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
permissions: | |
contents: write | |
steps: | |
- name: Download Addon | |
uses: actions/download-artifact@v4 | |
with: | |
name: DynamicOperations | |
path: . | |
- name: Push pre-release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "latest" | |
prerelease: true | |
title: "Development build" | |
files: dynops-latest.zip |