Skip to content

Commit

Permalink
update exec targets + add build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
phklive committed Jul 15, 2024
1 parent 60dfb26 commit 51fb7f0
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 19 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Runs build related jobs.

name: build

on:
push:
branches: [main, next]
pull_request:
types: [opened, reopened, synchronize]

jobs:
metal:
name: Build for metal
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@main
- name: Build for metal
run: |
rustup update --no-self-update ${{ matrix.toolchain }}
make exec-metal
sve:
name: Build for sve
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@main
- name: Build for sve
run: |
rustup update --no-self-update ${{ matrix.toolchain }}
make exec-sve
avx2:
name: Build for avx2
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@main
- name: Build for avx2
run: |
rustup update --no-self-update ${{ matrix.toolchain }}
make exec-avx2
no-std:
name: Build for no-std
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@main
- name: Build for no-std
run: |
rustup update --no-self-update ${{ matrix.toolchain }}
rustup target add wasm32-unknown-unknown
make build-no-std
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
toolchain: [stable, nightly]
os: [ubuntu-latest]
os: [ubuntu-latest, windows-latest]
timeout-minutes: 30
steps:
- uses: actions/checkout@main
Expand Down
42 changes: 26 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,38 +49,48 @@ test: ## Runs all tests
doc: ## Generates & checks documentation
$(WARNINGS) cargo doc --all-features --keep-going --release

.PHONY: mdbook
mdbook: ## Generates mdbook
mdbook exec docs/

# --- building ------------------------------------------------------------------------------------

.PHONY: build
build: ## Builds VM with optimized profile and features
build: ## Builds with default parameters
cargo build --release --features concurrent

.PHONY: build-no-std
build-no-std: ## Builds without the standard library
cargo build --no-default-features --target wasm32-unknown-unknown --workspace

# --- executing ------------------------------------------------------------------------------------

.PHONY: exec
exec: ## Builds with optimized profile and features
cargo build --profile optimized $(FEATURES_CONCURRENT_EXEC)

.PHONY: build-single
build-single: ## Builds VM in single-threaded mode
.PHONY: exec-single
exec-single: ## Builds in single-threaded mode
cargo build --profile optimized --features executable

.PHONY: build-release
build-release: ## Builds VM with release mode and no optimizations
cargo build --release $(FEATURES_CONCURRENT_EXEC)

.PHONY: build-metal
build-metal: ## Builds VM for metal
.PHONY: exec-metal
exec-metal: ## Builds for metal
cargo build --profile optimized $(FEATURES_METAL_EXEC)

.PHONY: build-avx2
build-avx2: ## Builds VM for avx2
.PHONY: exec-avx2
exec-avx2: ## Builds for avx2
RUSTFLAGS="-C target-feature=+avx2" cargo build --profile optimized $(FEATURES_CONCURRENT_EXEC)

.PHONY: build-sve
build-sve: ## Builds VM for sve
.PHONY: exec-sve
exec-sve: ## Builds for sve
RUSTFLAGS="-C target-feature=+sve" cargo build --profile optimized $(FEATURES_CONCURRENT_EXEC)

.PHONY: build-info
build-info: ## Builds VM with log tree
.PHONY: exec-info
exec-info: ## Builds with log tree
cargo build --profile optimized $(FEATURES_LOG_TREE)

# --- benchmarking --------------------------------------------------------------------------------

.PHONY: bench
bench: ## Runs VM benchmarks
bench: ## Runs benchmarks
cargo bench --profile optimized
2 changes: 1 addition & 1 deletion assembly/src/ast/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use super::{Export, Import, LocalNameResolver, ProcedureIndex, ProcedureName, Re
use crate::{
ast::{AliasTarget, AstSerdeOptions, Ident},
diagnostics::{Report, SourceFile},
sema::SemanticAnalysisError,
parser::ModuleParser,
sema::SemanticAnalysisError,
ByteReader, ByteWriter, Deserializable, DeserializationError, LibraryNamespace, LibraryPath,
Serializable, SourceSpan, Span, Spanned,
};
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

0 comments on commit 51fb7f0

Please sign in to comment.