Skip to content

Commit f0e8e65

Browse files
committed
workflow(test): try ubuntu with docker method to speed up compilation
1 parent 7ff9ee3 commit f0e8e65

File tree

3 files changed

+42
-45
lines changed

3 files changed

+42
-45
lines changed

.github/workflows/pre-release.yml

Lines changed: 29 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,53 +10,44 @@ run-name: Create pre-release for `${{ github.ref_name }}`
1010

1111
jobs:
1212
release-wasm:
13-
runs-on: windows-2022
13+
runs-on: ubuntu
1414
steps:
1515
- uses: actions/checkout@v4
1616

17-
- name: Install LLVM and Clang
18-
uses: KyleMayes/[email protected]
19-
with:
20-
version: "17.0.6"
21-
22-
- name: Cache cargo-msfs
23-
uses: actions/cache@v4
24-
with:
25-
path: ~\.cargo\bin
26-
key: ${{ runner.os }}-cargo-msfs
27-
28-
- name: Setup
29-
run: npm run setup
30-
3117
- name: Build WASM module
32-
run: npm run build:wasm-workflow
18+
uses: Navigraph/cargo-msfs@v1
19+
with:
20+
token: ${{ secrets.BOT_TOKEN }}
21+
run: npm run build:wasm-workflow
3322

3423
- name: Pre-Release
3524
uses: softprops/action-gh-release@v1
3625
with:
37-
files: ./out/msfs_navigation_data_interface.wasm
26+
files:
27+
- ./interface-2020.zip
28+
- ./interface-2024.zip
3829
prerelease: true
3930
generate_release_notes: true
4031

4132
# Enable in future to automate publishing of NPM package
42-
release-js:
43-
runs-on: ubuntu-latest
44-
steps:
45-
- uses: actions/checkout@v4
46-
47-
- uses: actions/setup-node@v4
48-
with:
49-
node-version: "18"
50-
registry-url: 'https://registry.npmjs.org'
51-
cache: "npm"
52-
53-
- name: Install node modules
54-
run: npm ci
55-
56-
- name: Build JS Interface
57-
run: cd src/js && npm run build
58-
59-
- name: Publish to NPM
60-
env:
61-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
62-
run: cd src/js && npm publish --tag next
33+
# release-js:
34+
# runs-on: ubuntu-latest
35+
# steps:
36+
# - uses: actions/checkout@v4
37+
38+
# - uses: actions/setup-node@v4
39+
# with:
40+
# node-version: "18"
41+
# registry-url: 'https://registry.npmjs.org'
42+
# cache: "npm"
43+
44+
# - name: Install node modules
45+
# run: npm ci
46+
47+
# - name: Build JS Interface
48+
# run: cd src/js && npm run build
49+
50+
# - name: Publish to NPM
51+
# env:
52+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
53+
# run: cd src/js && npm publish --tag next

scripts/build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
mkdir ../out
2+
3+
cargo-msfs info
4+
5+
cargo-msfs build msfs2020 -i .. -o ../out/msfs_navigation_data_interface.wasm
6+
7+
zip ../interface-2020.zip ../out/msfs_navigation_data_interface.wasm
8+
9+
rm -rf ../out
10+
11+
cargo-msfs build msfs2024 -i .. -o ../out/msfs_navigation_data_interface.wasm
12+
13+
zip ../interface-2024.zip ../out/msfs_navigation_data_interface.wasm

scripts/build_workflow.bat

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)