File tree Expand file tree Collapse file tree 14 files changed +68
-48
lines changed Expand file tree Collapse file tree 14 files changed +68
-48
lines changed Original file line number Diff line number Diff line change
1
+ target
2
+ out
3
+ node_modules
4
+ test_work
Original file line number Diff line number Diff line change 14
14
steps :
15
15
- uses : actions/checkout@v4
16
16
17
- - name : Build WASM module
18
- uses : Navigraph/cargo-msfs@v1
19
- with :
20
- token : ${{ secrets.BOT_TOKEN }}
21
- run : ./scripts/build.sh
22
-
23
- - name : Zip Modules
24
- run : |
25
- zip -j interface2020.zip out20/*
26
- zip -j interface2024.zip out24/*
17
+ - name : Workflow Script
18
+ run : ./scripts/workflow.sh
27
19
28
20
- name : Pre-Release
29
21
uses : softprops/action-gh-release@v1
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ tsconfig.tsbuildinfo
7
7
examples /aircraft /PackageSources /html_ui /Pages /VCockpit /Instruments /Navigraph /NavigationDataInterfaceSample
8
8
examples /aircraft /PackageSources /SimObjects /Airplanes /Navigraph_Navigation_Data_Interface_Aircraft /panel /msfs_navigation_data_interface.wasm
9
9
out
10
+ out20
11
+ out24
10
12
11
13
# Rust
12
14
# will have compiled files and executables
Original file line number Diff line number Diff line change
1
+ FROM ghcr.io/navigraph/cargo-msfs-bin:latest
2
+
3
+ WORKDIR /external
4
+
5
+ RUN apt install git -y
6
+
7
+ RUN cargo-msfs install msfs2020
8
+ RUN cargo-msfs install msfs2024
9
+
10
+ RUN apt install npm -y
11
+
12
+ COPY package.json ./
13
+ COPY package-lock.json ./
14
+
15
+ RUN npm i
16
+
17
+ COPY rust-toolchain.toml ./
18
+
19
+ RUN rustup show
20
+
21
+ COPY . .
22
+
23
+
Original file line number Diff line number Diff line change 7
7
"format" : " prettier --write ." ,
8
8
"lint:js" : " eslint \" src/js/**/*.ts\" " ,
9
9
"setup" : " .\\ scripts\\ setup.bat" ,
10
- "build:wasm" : " .\\ scripts\\ build.bat" ,
11
- "build:wasm-workflow" : " .\\ scripts\\ build_workflow.bat" ,
10
+ "build:wasm" : " .\\ scripts\\ build.bat both" ,
11
+ "build:wasm:2020" : " .\\ scripts\\ build.bat 2020" ,
12
+ "build:wasm:2024" : " .\\ scripts\\ build.bat 2024" ,
12
13
"build:js" : " cd .\\ src\\ js && npm run build" ,
13
14
"build:gauge" : " cd .\\ examples\\ gauge && npm run build" ,
14
15
"dev:gauge" : " cd .\\ examples\\ gauge && npm run dev" ,
Original file line number Diff line number Diff line change 2
2
3
3
cd %~dp0
4
4
5
- mkdir ..\out
5
+ CALL .\run_docker_cmd.bat ./scripts/build.sh %*
6
6
7
- cargo-msfs build msfs2020 -i .. -o ..\out\msfs_navigation_data_interface.wasm
8
-
9
- copy ..\out\msfs_navigation_data_interface.wasm ..\examples\aircraft\PackageSources\SimObjects\Airplanes\Navigraph_Navigation_Data_Interface_Aircraft\panel
7
+ copy ..\out20\msfs_navigation_data_interface.wasm ..\examples\aircraft\PackageSources\SimObjects\Airplanes\Navigraph_Navigation_Data_Interface_Aircraft\panel
Original file line number Diff line number Diff line change 1
- mkdir out20
2
- mkdir out24
3
-
4
- echo Installing MSFS SDK
1
+ #! /bin/bash
5
2
6
- cargo-msfs install msfs2020
7
- cargo-msfs install msfs2024
3
+ if ! [ -a out20 ]; then
4
+ mkdir out20
5
+ fi
8
6
9
- echo Building packages in dir $( pwd)
7
+ if ! [ -a out24 ]; then
8
+ mkdir out24
9
+ fi
10
10
11
- cargo-msfs build msfs2020 -i . -o out20/msfs_navigation_data_interface.wasm
12
- cargo-msfs build msfs2024 -i . -o out24/msfs_navigation_data_interface.wasm
11
+ if [ $1 = " 2020" ] || [ $1 = " both" ]; then
12
+ echo " Building MSFS 2020"
13
+ cargo-msfs build msfs2020 -i . -o out20/msfs_navigation_data_interface.wasm
14
+ fi
13
15
16
+ if [ $1 = " 2024" ] || [ $1 = " both" ]; then
17
+ echo " Building MSFS 2024"
18
+ cargo-msfs build msfs2024 -i . -o out24/msfs_navigation_data_interface.wasm
19
+ fi
Original file line number Diff line number Diff line change 1
1
@ echo off
2
2
3
- set image = " ghcr.io/flybywiresim/dev-env@sha256:aa36c0e4b8c66c2ec0195a104f8ae04a8ffbf45e8ddb6a8aca4f7237436bd876 "
3
+ set image = " local "
4
4
5
5
cd %~dp0
6
6
7
- docker run --rm -it -v " %cd% \..\:/external" -v " %cd% \..\out:/out " %image% %*
7
+ docker run --rm -it -v " %cd% \..\:/external" %image% %*
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ IMAGE=" local"
4
+
5
+ cd " $( dirname " $0 " ) "
6
+
7
+ echo " Running $@ in docker"
8
+
9
+ docker run --rm -v " $( pwd) /../:/external" $IMAGE " $@ "
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ docker build -t local .
2
+
3
+ ./scripts/run_docker_cmd.sh ./scripts/build.sh both
4
+
5
+ zip -j interface2020.zip out20/*
6
+ zip -j interface2024.zip out24/*
You can’t perform that action at this time.
0 commit comments