feat: args map #128
Workflow file for this run
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
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- feat/salsa | |
name: Lint and test | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
- os: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- run: rustup component add rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
override: true | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features | |
name: Clippy Output | |
cargo-audit: | |
name: Run cargo audit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Fetch latest release version of cargo-audit | |
run: | | |
mkdir -p .github/caching | |
cargo search cargo-audit | grep '^cargo-audit' | awk '{gsub(/"/,"",$3); print $3}' > .github/caching/cargo-audit.lock | |
- name: Cache cargo-audit/bin | |
id: cache-cargo-audit | |
uses: actions/cache@v1 | |
with: | |
path: ${{ runner.tool_cache }}/cargo-audit/bin | |
key: cargo-audit-bin-${{ hashFiles('.github/caching/cargo-audit.lock') }} | |
- name: Install cargo-audit | |
if: ${{ steps.cache-cargo-audit.outputs.cache-hit != 'true' }} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: --root ${{ runner.tool_cache }}/cargo-audit --force cargo-audit | |
- run: echo "${{ runner.tool_cache }}/cargo-audit/bin" >> $GITHUB_PATH | |
- run: cargo audit | |
package-code-extension: | |
name: Package extension (${{ matrix.platform }}-${{ matrix.arch }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
platform: win32 | |
arch: x64 | |
- os: windows-latest | |
platform: win32 | |
arch: ia32 | |
- os: windows-latest | |
platform: win32 | |
arch: arm64 | |
- os: macos-latest | |
platform: darwin | |
arch: x64 | |
- os: macos-latest | |
platform: darwin | |
arch: arm64 | |
- os: ubuntu-20.04 | |
platform: linux | |
arch: x64 | |
- os: ubuntu-20.04 | |
platform: linux | |
arch: arm64 | |
- os: ubuntu-20.04 | |
platform: linux | |
arch: armhf | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- shell: pwsh | |
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV | |
- name: Install npm dependencies | |
working-directory: ./editors/code | |
run: npm install | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package VSCode extension | |
working-directory: ./editors/code | |
run: npx vsce package --target ${{ env.target }} | |
package-code-amxxpawn-extension: | |
name: Package extension AMXXPawn (${{ matrix.platform }}-${{ matrix.arch }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
platform: win32 | |
arch: x64 | |
- os: windows-latest | |
platform: win32 | |
arch: ia32 | |
- os: windows-latest | |
platform: win32 | |
arch: arm64 | |
- os: macos-latest | |
platform: darwin | |
arch: x64 | |
- os: macos-latest | |
platform: darwin | |
arch: arm64 | |
- os: ubuntu-20.04 | |
platform: linux | |
arch: x64 | |
- os: ubuntu-20.04 | |
platform: linux | |
arch: arm64 | |
- os: ubuntu-20.04 | |
platform: linux | |
arch: armhf | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- shell: pwsh | |
run: echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV | |
- name: Install npm dependencies | |
working-directory: ./editors/code-amxxpawn | |
run: npm install | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package VSCode extension | |
working-directory: ./editors/code-amxxpawn | |
run: npx vsce package --target ${{ env.target }} |