Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 33 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- run: cargo fmt --check --verbose

test:
name: Cargo Test
runs-on: ubuntu-latest
Expand All @@ -34,6 +35,30 @@ jobs:
- run: rustc --version
- run: cargo test

catapult-new:
name: "Subcommands: new"
runs-on: ubuntu-latest
steps:
- run: >
sudo apt-get install -y
llvm
nasm
ninja-build
- name: Checkout
uses: actions/checkout@v4
- run: cargo build
- run: ./target/debug/catapult new --bin hello_ci --path hello_ci
- run: tree -a hello_ci
- run: >
./target/debug/catapult generate
--source-dir hello_ci
--build-dir hello_ci_build
--generator Ninja
--toolchain test_data/toolchain_clang.toml
- run: ninja -C hello_ci_build -v hello_ci
- run: tree -a hello_ci_build
- run: ./hello_ci_build/hello_ci/hello_ci

ubuntu-ninja-gcc:
name: Build and Run (Ubuntu / Ninja / GCC)
runs-on: ubuntu-latest
Expand All @@ -46,7 +71,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- run: cargo build
- run: ./target/debug/catapult -S test_data/test_01 -B build -G Ninja -T test_data/toolchain_gcc.toml
- run: ./target/debug/catapult generate -S test_data/test_01 -B build -G Ninja -T test_data/toolchain_gcc.toml
- run: tree build
- run: cat build/build.ninja
- run: ninja -C build -v myexe mytest
Expand All @@ -67,15 +92,15 @@ jobs:
uses: actions/checkout@v4
- run: cargo build

- run: ./target/debug/catapult --source-dir test_data/test_01 --build-dir build_debug --generator Ninja --toolchain test_data/toolchain_clang.toml --profile Debug
- run: ./target/debug/catapult generate --source-dir test_data/test_01 --build-dir build_debug --generator Ninja --toolchain test_data/toolchain_clang.toml --profile Debug
- run: tree build_debug
- run: cat build_debug/build.ninja
- run: ninja -C build_debug -v myexe mytest
- run: tree build_debug
- run: ./build_debug/test_one/myexe abc def
- run: ./build_debug/my_depend/mytest

- run: ./target/debug/catapult --source-dir test_data/test_01 --build-dir build_release --generator Ninja --toolchain test_data/toolchain_clang.toml --profile Release
- run: ./target/debug/catapult generate --source-dir test_data/test_01 --build-dir build_release --generator Ninja --toolchain test_data/toolchain_clang.toml --profile Release
- run: tree build_release
- run: cat build_release/build.ninja
- run: ninja -C build_release -v myexe mytest
Expand All @@ -98,15 +123,15 @@ jobs:
uses: ./.github/install-emscripten
- run: cargo build

- run: ./target/debug/catapult --source-dir test_data/test_01 --build-dir build_debug --generator Ninja --toolchain test_data/toolchain_emscripten.toml --profile Debug
- run: ./target/debug/catapult generate --source-dir test_data/test_01 --build-dir build_debug --generator Ninja --toolchain test_data/toolchain_emscripten.toml --profile Debug
- run: tree build_debug
- run: cat build_debug/build.ninja
- run: ninja -C build_debug -v myexe mytest
- run: tree build_debug
- run: node ./build_debug/test_one/myexe abc def
- run: node ./build_debug/my_depend/mytest

- run: ./target/debug/catapult --source-dir test_data/test_01 --build-dir build_release --generator Ninja --toolchain test_data/toolchain_emscripten.toml --profile Release
- run: ./target/debug/catapult generate --source-dir test_data/test_01 --build-dir build_release --generator Ninja --toolchain test_data/toolchain_emscripten.toml --profile Release
- run: tree build_release
- run: cat build_release/build.ninja
- run: ninja -C build_release -v myexe mytest
Expand All @@ -124,7 +149,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- run: cargo build
- run: ./target/debug/catapult --source-dir test_data/test_01 --build-dir build --generator MSVC --toolchain test_data/toolchain_msvc.toml
- run: ./target/debug/catapult generate --source-dir test_data/test_01 --build-dir build --generator MSVC --toolchain test_data/toolchain_msvc.toml
- run: tree /f build

- shell: cmd
Expand Down Expand Up @@ -166,7 +191,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- run: cargo build
- run: ./target/debug/catapult --source-dir test_data/test_01 --build-dir build --generator Ninja --toolchain test_data/toolchain_clang_win.toml --profile Debug
- run: ./target/debug/catapult generate --source-dir test_data/test_01 --build-dir build --generator Ninja --toolchain test_data/toolchain_clang_win.toml --profile Debug
- run: tree /f build
- run: Get-Content build/build.ninja
- run: ninja -C build -v myexe mytest
Expand All @@ -182,7 +207,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- run: cargo build
- run: ./target/debug/catapult --source-dir test_data/test_xcode_basic --build-dir build --generator Xcode --toolchain test_data/toolchain_xcode.toml
- run: ./target/debug/catapult generate --source-dir test_data/test_xcode_basic --build-dir build --generator Xcode --toolchain test_data/toolchain_xcode.toml
- run: ls -R build
- run: xcodebuild -project build/basic/basic.xcodeproj -configuration Debug SYMROOT=$PWD/build/basic/DerivedData build
- run: ls -R build
Expand Down
109 changes: 97 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ edition = "2021"

[[bin]]
name = "catapult"
path = "src/main.rs"
path = "src/bin/main.rs"

[lib]
name = "catapult"
Expand All @@ -18,10 +18,10 @@ name = "catapult"
allocative = "0.3.1"
anyhow = "1.0.65"
base64 = "0.21"
clap = { version = "4.5.42" }
dirs = "5.0.1"
env_logger = "0.10"
flate2 = "1.0"
getopts = "0.2"
log = "0.4"
reqwest = { version = "0.11", features = ["blocking", "json"] }
serde = "1.0"
Expand All @@ -33,3 +33,6 @@ uuid = { version = "1.4", features = [
"fast-rng", # Use a faster (but still sufficiently random) RNG
"macro-diagnostics", # Enable better diagnostics for compile-time UUIDs
] }

[lints.clippy]
uninlined_format_args = "allow"
Loading
Loading