Skip to content

Commit

Permalink
Merge branch 'main' into test_rework
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettMayson committed Oct 20, 2024
2 parents 7c4e9a2 + cc758fd commit 42d81b9
Show file tree
Hide file tree
Showing 5 changed files with 292 additions and 292 deletions.
176 changes: 88 additions & 88 deletions .github/workflows/browser.yaml
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
# name: Browser
name: Browser

# on:
# push:
# branches: [ main ]
# pull_request:
# branches: [ main ]
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

# jobs:
# build-wasm:
# name: Build WASM
# runs-on: ubuntu-latest
# steps:
# - name: Checkout the source code
# uses: actions/checkout@master
# - name: Install wasm-pack
# run: cargo install wasm-pack
# - name: Rust Cache
# uses: Swatinem/rust-cache@v2
# with:
# key: browser
# - name: Build
# run: wasm-pack build libs/paa --target web --features wasm
# - name: Rename
# run: |
# mv libs/paa/pkg/hemtt_paa_bg.wasm hemtt_paa_bg.wasm
# mv libs/paa/pkg/hemtt_paa.js hemtt_paa.js
# - name: Upload
# uses: actions/upload-artifact@v4
# with:
# name: wasm
# path: |
# hemtt_paa_bg.wasm
# hemtt_paa.js
jobs:
build-wasm:
name: Build WASM
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: browser
- name: Build
run: wasm-pack build libs/paa --target web --features wasm
- name: Rename
run: |
mv libs/paa/pkg/hemtt_paa_bg.wasm hemtt_paa_bg.wasm
mv libs/paa/pkg/hemtt_paa.js hemtt_paa.js
- name: Upload
uses: actions/upload-artifact@v4
with:
name: wasm
path: |
hemtt_paa_bg.wasm
hemtt_paa.js
# firefox:
# name: Firefox
# runs-on: ubuntu-latest
# needs: build-wasm
# steps:
# - name: Checkout the source code
# uses: actions/checkout@v4
# - name: Download wasm
# uses: actions/download-artifact@v4
# with:
# name: wasm
# path: wasm
# - name: Move wasm
# run: |
# mv wasm/hemtt_paa_bg.wasm browser/hemtt_paa_bg.wasm
# mv wasm/hemtt_paa.js browser/hemtt_paa.js
# - name: Rename manifest
# run: mv browser/manifest.firefox.json browser/manifest.json && rm browser/manifest.chrome.json
# - name: zip
# run: |
# cd browser
# zip -r firefox.zip *
# mv firefox.zip ../firefox.zip
# - name: Upload
# uses: actions/upload-artifact@v4
# with:
# name: firefox
# path: firefox.zip
firefox:
name: Firefox
runs-on: ubuntu-latest
needs: build-wasm
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Download wasm
uses: actions/download-artifact@v4
with:
name: wasm
path: wasm
- name: Move wasm
run: |
mv wasm/hemtt_paa_bg.wasm browser/hemtt_paa_bg.wasm
mv wasm/hemtt_paa.js browser/hemtt_paa.js
- name: Rename manifest
run: mv browser/manifest.firefox.json browser/manifest.json && rm browser/manifest.chrome.json
- name: zip
run: |
cd browser
zip -r firefox.zip *
mv firefox.zip ../firefox.zip
- name: Upload
uses: actions/upload-artifact@v4
with:
name: firefox
path: firefox.zip

# chrome:
# name: Chrome
# runs-on: ubuntu-latest
# needs: build-wasm
# steps:
# - name: Checkout the source code
# uses: actions/checkout@v4
# - name: Download wasm
# uses: actions/download-artifact@v4
# with:
# name: wasm
# path: wasm
# - name: Move wasm
# run: |
# mv wasm/hemtt_paa_bg.wasm browser/hemtt_paa_bg.wasm
# mv wasm/hemtt_paa.js browser/hemtt_paa.js
# - name: Rename manifest
# run: mv browser/manifest.chrome.json browser/manifest.json && rm browser/manifest.firefox.json
# - name: zip
# run: |
# cd browser
# zip -r chrome.zip *
# mv chrome.zip ../chrome.zip
# - name: Upload
# uses: actions/upload-artifact@v4
# with:
# name: chrome
# path: chrome.zip
chrome:
name: Chrome
runs-on: ubuntu-latest
needs: build-wasm
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Download wasm
uses: actions/download-artifact@v4
with:
name: wasm
path: wasm
- name: Move wasm
run: |
mv wasm/hemtt_paa_bg.wasm browser/hemtt_paa_bg.wasm
mv wasm/hemtt_paa.js browser/hemtt_paa.js
- name: Rename manifest
run: mv browser/manifest.chrome.json browser/manifest.json && rm browser/manifest.firefox.json
- name: zip
run: |
cd browser
zip -r chrome.zip *
mv chrome.zip ../chrome.zip
- name: Upload
uses: actions/upload-artifact@v4
with:
name: chrome
path: chrome.zip
18 changes: 9 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
artifact: windows-x64
exe: hemtt.exe
# Intel Mac
# - runner: macos-13
# name: macos-x64
# artifact: macos-x64
# exe: hemtt
# # ARM Mac
# - runner: macos-latest
# name: macos-arm
# artifact: macos-arm64
# exe: hemtt
- runner: macos-13
name: macos-x64
artifact: macos-x64
exe: hemtt
# ARM Mac
- runner: macos-latest
name: macos-arm
artifact: macos-arm64
exe: hemtt
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand Down
104 changes: 52 additions & 52 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
# name: Coverage
name: Coverage

# on:
# push:
# branches: [main]
# pull_request:
on:
push:
branches: [main]
pull_request:

# permissions:
# contents: read
permissions:
contents: read

# env:
# CARGO_TERM_COLOR: always
env:
CARGO_TERM_COLOR: always

# jobs:
# coverage:
# name: ${{ matrix.os.name }} / tests
# runs-on: ${{ matrix.os.runner }}
# strategy:
# fail-fast: false
# matrix:
# os:
# - runner: ubuntu-latest
# name: ubuntu
# - runner: windows-latest
# name: windows
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: true
# - name: Install stable
# uses: dtolnay/rust-toolchain@stable
# with:
# components: llvm-tools-preview
# - uses: taiki-e/install-action@cargo-llvm-cov
# - uses: taiki-e/install-action@nextest
# - name: cargo generate-lockfile
# if: hashFiles('Cargo.lock') == ''
# run: cargo generate-lockfile
# - name: Install Arma 3 Tools
# if: startsWith(matrix.os.runner, 'windows')
# uses: arma-actions/arma3-tools@master
# with:
# toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
# - name: cargo llvm-cov
# run: cargo llvm-cov nextest --locked --all-features --lcov --output-path out.lcov
# - name: Upload Coverage to GitHub Artifacts
# uses: actions/upload-artifact@v4
# with:
# name: ${{ matrix.os.name }}-coverage
# path: out.lcov
# - name: Upload to codecov.io
# uses: codecov/codecov-action@v4
# with:
# files: out.lcov
# fail_ci_if_error: true
# token: ${{ secrets.CODECOV_TOKEN }}
jobs:
coverage:
name: ${{ matrix.os.name }} / tests
runs-on: ${{ matrix.os.runner }}
strategy:
fail-fast: false
matrix:
os:
- runner: ubuntu-latest
name: ubuntu
- runner: windows-latest
name: windows
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: Install Arma 3 Tools
if: startsWith(matrix.os.runner, 'windows')
uses: arma-actions/arma3-tools@master
with:
toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }}
- name: cargo llvm-cov
run: cargo llvm-cov nextest --locked --all-features --lcov --output-path out.lcov
- name: Upload Coverage to GitHub Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os.name }}-coverage
path: out.lcov
- name: Upload to codecov.io
uses: codecov/codecov-action@v4
with:
files: out.lcov
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
Loading

0 comments on commit 42d81b9

Please sign in to comment.