mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-24 23:15:24 +03:00
try again to bundle importer in release for oneshot. disable gdal.
[rebuild]
This commit is contained in:
parent
c04ce5a5c0
commit
e082082c32
18
.github/workflows/main.yml
vendored
18
.github/workflows/main.yml
vendored
@ -9,10 +9,12 @@ jobs:
|
||||
- uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
rust-version: 1.43.0
|
||||
- name: Run build
|
||||
- name: Build game
|
||||
run: cargo build --release --bin game
|
||||
- name: Build importer
|
||||
run: cargo build --release --bin importer
|
||||
- name: Package release
|
||||
run: ./release/build.sh abst_windows play_abstreet.bat target/release/game.exe
|
||||
run: ./release/build.sh abst_windows play_abstreet.bat target/release/game.exe target/release/importer.exe
|
||||
- name: Upload binary
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
@ -26,10 +28,12 @@ jobs:
|
||||
- uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
rust-version: 1.43.0
|
||||
- name: Run build
|
||||
- name: Build game
|
||||
run: cargo build --release --bin game
|
||||
- name: Build importer
|
||||
run: cargo build --release --bin importer
|
||||
- name: Package release
|
||||
run: ./release/build.sh abst_mac play_abstreet.sh target/release/game
|
||||
run: ./release/build.sh abst_mac play_abstreet.sh target/release/game target/release/importer
|
||||
- name: Upload release
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
@ -43,10 +47,12 @@ jobs:
|
||||
- uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
rust-version: 1.43.0
|
||||
- name: Run build
|
||||
- name: Build game
|
||||
run: cargo build --release --bin game
|
||||
- name: Build importer
|
||||
run: cargo build --release --bin importer
|
||||
- name: Package release
|
||||
run: ./release/build.sh abst_linux play_abstreet.sh target/release/game
|
||||
run: ./release/build.sh abst_linux play_abstreet.sh target/release/game target/release/importer
|
||||
- name: Upload release
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd importer;
|
||||
RUST_BACKTRACE=1 cargo run --release -- $@;
|
||||
RUST_BACKTRACE=1 cargo run --release --features scenarios -- $@;
|
||||
cd ..;
|
||||
|
@ -4,12 +4,16 @@ version = "0.1.0"
|
||||
authors = ["Dustin Carlino <dabreegster@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
scenarios = ["gdal"]
|
||||
|
||||
[dependencies]
|
||||
abstutil = { path = "../abstutil" }
|
||||
convert_osm = { path = "../convert_osm" }
|
||||
csv = "1.0.1"
|
||||
geom = { path = "../geom" }
|
||||
gdal = "0.6.0"
|
||||
gdal = { version = "0.6.0", optional = true }
|
||||
kml = { path = "../kml" }
|
||||
map_model = { path = "../map_model" }
|
||||
serde = "1.0.98"
|
||||
|
@ -1,5 +1,6 @@
|
||||
mod austin;
|
||||
mod seattle;
|
||||
#[cfg(feature = "scenarios")]
|
||||
mod soundcast;
|
||||
mod utils;
|
||||
|
||||
@ -97,6 +98,7 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "scenarios")]
|
||||
if job.scenario {
|
||||
assert_eq!(job.city, "seattle");
|
||||
seattle::ensure_popdat_exists();
|
||||
@ -106,6 +108,7 @@ fn main() {
|
||||
soundcast::make_weekday_scenario(&map, &mut timer).save();
|
||||
}
|
||||
|
||||
#[cfg(feature = "scenarios")]
|
||||
if job.scenario_everyone {
|
||||
assert_eq!(job.city, "seattle");
|
||||
seattle::ensure_popdat_exists();
|
||||
|
@ -70,6 +70,7 @@ pub fn osm_to_raw(name: &str) {
|
||||
}
|
||||
|
||||
// Download and pre-process data needed to generate Seattle scenarios.
|
||||
#[cfg(feature = "scenarios")]
|
||||
pub fn ensure_popdat_exists() {
|
||||
if abstutil::file_exists(abstutil::path_popdat()) {
|
||||
println!("- {} exists, not regenerating it", abstutil::path_popdat());
|
||||
|
@ -5,7 +5,8 @@ set -e
|
||||
|
||||
output=$1;
|
||||
runner=$2;
|
||||
binary=$3;
|
||||
game_binary=$3;
|
||||
importer_binary=$4;
|
||||
|
||||
cargo run --bin updater
|
||||
|
||||
@ -14,7 +15,9 @@ mkdir $output
|
||||
cp docs/INSTRUCTIONS.md $output
|
||||
cp release/$runner $output
|
||||
mkdir $output/game
|
||||
cp $binary $output/game
|
||||
cp $game_binary $output/game
|
||||
mkdir $output/importer
|
||||
cp $importer_binary $output/importer
|
||||
mkdir $output/data
|
||||
cp -Rv data/system $output/data/system
|
||||
|
||||
|
@ -27,6 +27,8 @@ cd game
|
||||
rm -f game
|
||||
unzip ~/Downloads/game_exe.zip
|
||||
rm -f ~/Downloads/game_exe.zip
|
||||
rm -f ../importer/importer
|
||||
mv importer.exe ../importer
|
||||
cd ../..
|
||||
|
||||
zip -r abstreet_linux_$VERSION abstreet_linux_$VERSION
|
||||
|
Loading…
Reference in New Issue
Block a user