Skip to content

Commit

Permalink
build: update to dev-env with SDK 0.13 and LLVM 12 (flybywiresim#4960)
Browse files Browse the repository at this point in the history
  • Loading branch information
aguther authored May 31, 2021
1 parent 5e0c0dc commit b463228
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 84 deletions.
148 changes: 66 additions & 82 deletions Cargo.lock

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,23 @@

set -ex

# store current file ownership
ORIGINAL_USER_ID=$(stat -c '%u' /external)
ORIGINAL_GROUP_ID=$(stat -c '%g' /external)

# set ownership to root to fix cargo/rust build (when run as github action)
if [ "${GITHUB_ACTIONS}" == "true" ]; then
chown -R root:root /external
fi

# run build
if [ "$1" = "--no-tty" ]; then
npx igniter --no-tty
else
npx igniter
fi

# restore ownership (when run as github action)
if [ "${GITHUB_ACTIONS}" == "true" ]; then
chown -R ${ORIGINAL_USER_ID}:${ORIGINAL_GROUP_ID} /external
fi
2 changes: 1 addition & 1 deletion scripts/dev-env/run.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@echo off

set image="ghcr.io/flybywiresim/dev-env@sha256:0bf0844b914cbd45a8a0a866a71c7a07fa09308f48cb961708be479f0d63aa0f"
set image="ghcr.io/flybywiresim/dev-env@sha256:626f12e8f5ca0517f39fc2b046eb91036998803b7cd483482581447d07e4ae7d"

docker image inspect %image% 1> nul || docker system prune --filter label=flybywiresim=true -f
docker run --rm -it -v "%cd%:/external" %image% %*
3 changes: 2 additions & 1 deletion scripts/dev-env/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

IMAGE="ghcr.io/flybywiresim/dev-env@sha256:0bf0844b914cbd45a8a0a866a71c7a07fa09308f48cb961708be479f0d63aa0f"
IMAGE="ghcr.io/flybywiresim/dev-env@sha256:626f12e8f5ca0517f39fc2b046eb91036998803b7cd483482581447d07e4ae7d"

# only set `-it` if there is a tty
if [ -t 0 ] && [ -t 1 ];
Expand All @@ -15,6 +15,7 @@ docker image inspect $IMAGE 1> /dev/null || docker system prune --filter label=f

docker run \
--rm $TTY_PARAM \
-e GITHUB_ACTIONS="${GITHUB_ACTIONS}" \
-e GITHUB_ACTOR="${GITHUB_ACTOR}" \
-e GITHUB_REF="${GITHUB_REF}" \
-e GITHUB_SHA="${GITHUB_SHA}" \
Expand Down
1 change: 1 addition & 0 deletions src/fadec/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ clang++ \
-D_LIBCPP_HAS_NO_THREADS \
-D_WINDLL \
-D_MBCS \
-mthread-model single \
-fno-exceptions \
-fms-extensions \
-fvisibility=hidden \
Expand Down
2 changes: 2 additions & 0 deletions src/fbw/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ clang \
-D_LIBCPP_HAS_NO_THREADS \
-D_WINDLL \
-D_MBCS \
-mthread-model single \
-fno-exceptions \
-fms-extensions \
-fvisibility=hidden \
Expand Down Expand Up @@ -57,6 +58,7 @@ clang++ \
-D_LIBCPP_HAS_NO_THREADS \
-D_WINDLL \
-D_MBCS \
-mthread-model single \
-fno-exceptions \
-fms-extensions \
-fvisibility=hidden \
Expand Down
2 changes: 2 additions & 0 deletions src/systems/a320_systems/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::suspicious_operation_groupings)]

mod electrical;
mod fuel;
mod hydraulic;
Expand Down
1 change: 1 addition & 0 deletions src/systems/systems/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
//! Throughout type names and documentation:
//! - **Simulator** refers to the simulator you integrate with, such as MSFS.
//! - **Simulation** refers to the system simulation you create by using this crate.
#![allow(clippy::suspicious_operation_groupings)]
#[macro_use]
mod macros;

Expand Down

0 comments on commit b463228

Please sign in to comment.