Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(build): conditional preparation step #9607

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ jobs:
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
echo TEXTURE_RESOLUTION_8K=true >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
Expand Down Expand Up @@ -304,6 +305,7 @@ jobs:
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
echo TEXTURE_RESOLUTION_8K=false >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ jobs:
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
echo TEXTURE_RESOLUTION_8K=true >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
Expand Down Expand Up @@ -256,6 +257,7 @@ jobs:
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
echo TEXTURE_RESOLUTION_8K=false >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ jobs:
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
echo TEXTURE_RESOLUTION_8K=true >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
Expand Down Expand Up @@ -293,6 +294,7 @@ jobs:
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
echo TEXTURE_RESOLUTION_8K=false >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ jobs:
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
echo TEXTURE_RESOLUTION_8K=true >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
Expand Down Expand Up @@ -335,6 +336,7 @@ jobs:
echo BUILD_DIR_NAME=${{ env.BUILD_DIR_NAME }} >> .env
echo LOCALAZY_READ_KEY=${{ secrets.LOCALAZY_READ_KEY }} >> .env
echo VITE_BUILD=false >> .env
echo TEXTURE_RESOLUTION_8K=false >> .env
- name: Install dependencies
run: |
./scripts/dev-env/run.sh ./scripts/setup.sh --clean
Expand Down
49 changes: 12 additions & 37 deletions igniter.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { ExecTask, TaskOfTasks } from '@flybywiresim/igniter';
import { getInstrumentsIgniterTasks as getA320InstrumentsIgniterTasks } from './fbw-a32nx/src/systems/instruments/buildSrc/igniter/tasks.mjs';
import { getInstrumentsIgniterTasks as getA380InstrumentsIgniterTasks } from './fbw-a380x/src/systems/instruments/buildSrc/igniter/tasks.mjs';
import buildUtils from './build-utils.js'

buildUtils.defineEnvVars();

const isCiBuild = process.env.GITHUB_ACTIONS === 'true';
const resolutionIs8k = process.env.TEXTURE_RESOLUTION_8K === 'true';

export default new TaskOfTasks('all', [
// A32NX Task
Expand Down Expand Up @@ -133,45 +139,14 @@ export default new TaskOfTasks('all', [
'preparation',
[
new TaskOfTasks(
'ci-build',
isCiBuild ? 'ci-build' : 'local-build',
[
new ExecTask('copy-base-files (8K)', [
'npm run build-a380x:link-base-files',
'npm run unchunkLargeFiles',
'npm run build-a380x:link-large-files',
'npm run build-a380x:link-large-files-texture-8k',
// temporary until folder exists
'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/',
]),
new ExecTask('copy-base-files (4K)', [
'npm run build-a380x:link-base-files',
'npm run unchunkLargeFiles',
'npm run build-a380x:link-large-files',
'npm run build-a380x:link-large-files-texture-4k',
// temporary until folder exists
'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/',
]),
],
false,
),
new TaskOfTasks(
'local-build',
[
new ExecTask('copy-base-files (8K)', [
'npm run build-a380x:copy-base-files',
'npm run unchunkLargeFiles',
'npm run build-a380x:copy-large-files',
'npm run build-a380x:copy-large-files-texture-8k',
'npm run chunkLargeFiles',
// temporary until folder exists
'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/',
]),
new ExecTask('copy-base-files (4K)', [
'npm run build-a380x:copy-base-files',
new ExecTask(`copy-base-files (${resolutionIs8k ? 8 : 4}K)`, [
isCiBuild ? 'npm run build-a380x:link-base-files' : 'npm run build-a380x:copy-base-files',
'npm run unchunkLargeFiles',
'npm run build-a380x:copy-large-files',
'npm run build-a380x:copy-large-files-texture-4k',
'npm run chunkLargeFiles',
isCiBuild ? 'npm run build-a380x:link-large-files' : 'npm run build-a380x:copy-large-files',
isCiBuild ? `npm run build-a380x:link-large-files-texture-${resolutionIs8k ? 8 : 4}k` : `npm run build-a380x:copy-large-files-texture-${resolutionIs8k ? 8 : 4}k`,
...(isCiBuild ? [] : ['npm run chunkLargeFiles']),
// temporary until folder exists
'mkdir -p fbw-a380x/out/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/',
]),
Expand Down