Skip to content

Commit

Permalink
Merge branch 'master' into pr/8432
Browse files Browse the repository at this point in the history
  • Loading branch information
johnb432 committed Nov 3, 2024
2 parents bd5e048 + b153310 commit 017e4b9
Show file tree
Hide file tree
Showing 1,947 changed files with 37,220 additions and 89,790 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2

[Makefile]
indent_style = tab
10 changes: 1 addition & 9 deletions .github/workflows/arma.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ jobs:
- name: Validate function headers
run: python3 docs/tools/document_functions.py --debug

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Lint (sqflint)
uses: arma-actions/sqflint@master
continue-on-error: true # No failure due to many false-positives

build:
runs-on: ubuntu-latest
steps:
Expand All @@ -52,3 +43,4 @@ jobs:
with:
name: ace3-${{ github.sha }}-nobin
path: .hemttout/@*
include-hidden-files: true # Because .hemttout is a hidden directory
64 changes: 50 additions & 14 deletions .github/workflows/extensions.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,65 @@
name: Extensions

on:
pull_request:
push:
paths:
- 'extensions/**'
- 'extension/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/extensions.yml'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Install dependencies
run: |
rustup toolchain update stable --no-self-update
rustup default stable
rustup component add clippy rustfmt
- name: Run rustfmt
run: cargo fmt -- --check
- name: Run clippy
run: cargo clippy --all -- -Dwarnings

test:
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin
options: --security-opt seccomp=unconfined
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Test & Coverage
run: cargo tarpaulin --verbose --no-default-features --workspace --timeout 240

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]

arrays: [
os: { tag: "windows-latest", target: "i686-pc-windows-msvc" },
os: { tag: "windows-latest", target: "x86_64-pc-windows-msvc" },
]
runs-on: ${{ matrix.arrays.os.tag }}
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Install stable Rust
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.arrays.os.target }}
toolchain: stable
default: true
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Build
shell: cmd
run: |
cd extensions
mkdir build
cd build
cmake .. && cmake --build .
- name: Upload Artifact
run: cargo build --verbose
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ace3_extensions-${{ matrix.os }}-debug
path: extensions/build
name: ${{ matrix.arrays.os.target }}
path: target/debug/ace.dll
if-no-files-found: error
retention-days: 30
3 changes: 3 additions & 0 deletions .github/workflows/hemtt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
xcopy /e /h /q pullrequest\addons addons\
xcopy /e /h /q pullrequest\optionals optionals\
xcopy /e /h /q pullrequest\include include\
xcopy /y /h /q pullrequest\ace.dll ace.dll
xcopy /y /h /q pullrequest\ace_x64.dll ace_x64.dll
- name: Run HEMTT build
run: hemtt build
- name: Rename build folder
Expand All @@ -42,3 +44,4 @@ jobs:
with:
name: ace3-${{ github.sha }}
path: .hemttout/@*
include-hidden-files: true # Because .hemttout is a hidden directory
166 changes: 83 additions & 83 deletions .github/workflows/pboproject.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
name: pboProject
# name: pboProject

on:
push:
branches:
- master
pull_request_target:
# on:
# push:
# branches:
# - master
# pull_request_target:

jobs:
pboproject:
runs-on: windows-2022
steps:
- name: Install Arma 3 Tools
uses: arma-actions/arma3-tools@master
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
- name: Install Mikero Tools
uses: arma-actions/mikero-tools@2023-01-04
- name: Download game data
run: |
Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip
Invoke-WebRequest "$env:RHSAFRF_URL" -OutFile rhsafrf.zip
Invoke-WebRequest "$env:RHSGREF_URL" -OutFile rhsgref.zip
Invoke-WebRequest "$env:RHSSAF_URL" -OutFile rhssaf.zip
Invoke-WebRequest "$env:RHSUSF_URL" -OutFile rhsusf.zip
$files = @("arma3.zip", "rhsafrf.zip", "rhsgref.zip", "rhssaf.zip", "rhsusf.zip")
ForEach ($file in $files) {
Expand-7ZipArchive -Path $file -DestinationPath .
Remove-Item $file
}
env:
ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }}
RHSAFRF_URL: ${{ secrets.RHSAFRF_URL }}
RHSGREF_URL: ${{ secrets.RHSGREF_URL }}
RHSSAF_URL: ${{ secrets.RHSSAF_URL }}
RHSUSF_URL: ${{ secrets.RHSUSF_URL }}
- name: Checkout CBA A3
uses: actions/checkout@v4
with:
path: x\cba
ref: master
repository: CBATeam/CBA_A3.git
- name: Checkout ACE3
uses: actions/checkout@v4
with:
path: z\ace
persist-credentials: false
- name: Checkout pull request
uses: actions/checkout@v4
if: ${{ github.event_name == 'pull_request_target' }}
with:
path: pullrequest
ref: 'refs/pull/${{ github.event.number }}/merge'
- name: Replace addons with pull request addons
if: ${{ github.event_name == 'pull_request_target' }}
run: |
rm -r z\ace\addons\
rm -r z\ace\optionals\
rm -r z\ace\tools\pDummies\
xcopy /e /h /q pullrequest\addons z\ace\addons\
xcopy /e /h /q pullrequest\optionals z\ace\optionals\
xcopy /e /h /q pullrequest\tools\pDummies z\ace\tools\pDummies\
- name: Setup build environment
run: |
subst P: .
pboproject -P
xcopy /e /h /q z\ace\tools\pDummies\gm gm\
xcopy /e /h /q z\ace\tools\pDummies\vn vn\
xcopy /e /h /q z\ace\tools\pDummies\WW2 WW2\
xcopy /e /h /q z\ace\tools\pDummies\CUP CUP\
- name: Build
run: py P:\z\ace\tools\make.py ci
env:
PYTHONUNBUFFERED: 1
- name: Archive logs
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: logs
path: temp/*.log
- name: Archive @ace
uses: actions/upload-artifact@v4
with:
name: '@ace3-${{ github.sha }}'
path: z\ace\release\@ace
# jobs:
# pboproject:
# runs-on: windows-2022
# steps:
# - name: Install Arma 3 Tools
# uses: arma-actions/arma3-tools@master
# with:
# toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
# - name: Install Mikero Tools
# uses: arma-actions/mikero-tools@2024-10-08
# - name: Download game data
# run: |
# Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip
# Invoke-WebRequest "$env:RHSAFRF_URL" -OutFile rhsafrf.zip
# Invoke-WebRequest "$env:RHSGREF_URL" -OutFile rhsgref.zip
# Invoke-WebRequest "$env:RHSSAF_URL" -OutFile rhssaf.zip
# Invoke-WebRequest "$env:RHSUSF_URL" -OutFile rhsusf.zip
# $files = @("arma3.zip", "rhsafrf.zip", "rhsgref.zip", "rhssaf.zip", "rhsusf.zip")
# ForEach ($file in $files) {
# Expand-7ZipArchive -Path $file -DestinationPath .
# Remove-Item $file
# }
# env:
# ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }}
# RHSAFRF_URL: ${{ secrets.RHSAFRF_URL }}
# RHSGREF_URL: ${{ secrets.RHSGREF_URL }}
# RHSSAF_URL: ${{ secrets.RHSSAF_URL }}
# RHSUSF_URL: ${{ secrets.RHSUSF_URL }}
# - name: Checkout CBA A3
# uses: actions/checkout@v4
# with:
# path: x\cba
# ref: master
# repository: CBATeam/CBA_A3.git
# - name: Checkout ACE3
# uses: actions/checkout@v4
# with:
# path: z\ace
# persist-credentials: false
# - name: Checkout pull request
# uses: actions/checkout@v4
# if: ${{ github.event_name == 'pull_request_target' }}
# with:
# path: pullrequest
# ref: 'refs/pull/${{ github.event.number }}/merge'
# - name: Replace addons with pull request addons
# if: ${{ github.event_name == 'pull_request_target' }}
# run: |
# rm -r z\ace\addons\
# rm -r z\ace\optionals\
# rm -r z\ace\tools\pDummies\
# xcopy /e /h /q pullrequest\addons z\ace\addons\
# xcopy /e /h /q pullrequest\optionals z\ace\optionals\
# xcopy /e /h /q pullrequest\tools\pDummies z\ace\tools\pDummies\
# - name: Setup build environment
# run: |
# subst P: .
# pboproject -P
# xcopy /e /h /q z\ace\tools\pDummies\gm gm\
# xcopy /e /h /q z\ace\tools\pDummies\vn vn\
# xcopy /e /h /q z\ace\tools\pDummies\WW2 WW2\
# xcopy /e /h /q z\ace\tools\pDummies\CUP CUP\
# - name: Build
# run: py P:\z\ace\tools\make.py ci
# env:
# PYTHONUNBUFFERED: 1
# - name: Archive logs
# uses: actions/upload-artifact@v4
# if: ${{ always() }}
# with:
# name: logs
# path: temp/*.log
# - name: Archive @ace
# uses: actions/upload-artifact@v4
# with:
# name: '@ace3-${{ github.sha }}'
# path: z\ace\release\@ace
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
*.zip
release/*
releases/*
extensions/vcproj32/*
extensions/vcproj64/*
.vscode/*
hemtt
hemtt.exe
Expand All @@ -20,4 +18,5 @@ CHANGELOG.md
sqfvm.exe
ArmaScriptCompiler.exe
*.sqfc
target/
!extras/**/*.zip
31 changes: 31 additions & 0 deletions .hemtt/launch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[default]
workshop = [
"450814997", # CBA_A3
]

[spe]
extends = "default"
dlc = [
"Spearhead 1944"
]

[vn]
extends = "default"
dlc = [
"S.O.G. Prairie Fire",
]

[ws]
extends = "default"
dlc = [
"Western Sahara",
]

[rhs]
extends = "default"
workshop = [
"843425103", # RHS AFRF Workshop ID
"843577117", # RHS USAF Workshop ID
"843593391", # RHS GREF Workshop ID
"843632231", # RHS SAF Workshop ID
]
24 changes: 24 additions & 0 deletions .hemtt/lints.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[sqf.banned_commands]
options.ignore = [
"addPublicVariableEventHandler", # Alt syntax is broken, we are using main syntax
"createSoundSource", # Greatly attenuated when in first person and in a vehicle
]

[sqf.var_all_caps]
options.ignore = [
"SLX_*", "ACE_*"
]

[sqf.undefined]
enabled = true
options.check_orphan_code = true

[sqf.unused]
#enabled = true #many false positives without DEBUG_MODE_FULL
options.check_params = false

[sqf.shadowed]
enabled = false

[sqf.not_private]
enabled = true
Loading

0 comments on commit 017e4b9

Please sign in to comment.