aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/main.yml59
-rw-r--r--docker-compose.yml1
-rwxr-xr-xscripts/build-qbs-with-qbs.sh4
-rw-r--r--scripts/make-release-archives.bat2
-rw-r--r--src/packages/archive/archive.qbs4
-rw-r--r--src/packages/packages.qbs2
6 files changed, 43 insertions, 29 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f0846481f..6785b2eb7 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -13,7 +13,11 @@ jobs:
config:
- {
name: 'Build on Linux (gcc)',
- options: 'modules.cpp.compilerWrapper:ccache modules.qbs.debugInformation:true modules.qbsbuildconfig.enableBundledQt:true',
+ options: 'modules.cpp.compilerWrapper:ccache
+ modules.qbs.debugInformation:true
+ modules.qbsbuildconfig.enableBundledQt:true
+ products.qbs_archive.targetName:qbs-linux-${{ github.run_id }}
+ products.qbs_archive.includeTests:true',
script: './scripts/build-qbs-with-qbs.sh',
cacheid: 'gcc',
}
@@ -43,13 +47,11 @@ jobs:
run: docker-compose run bionic ${{ matrix.config.script }}
- name: Print ccache stats
run: docker-compose run bionic ccache -s
- - name: Create acrhive
- run: tar -C release/install-root/ -cJf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz usr/local
- name: Upload artifacts
uses: 'actions/upload-artifact@v2'
with:
- name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
- path: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
+ name: qbs-linux-${{ github.run_id }}.tar.gz
+ path: release/qbs-linux-${{ github.run_id }}.tar.gz
build-linux-extra:
name: ${{ matrix.config.name }}
@@ -108,7 +110,13 @@ jobs:
runs-on: macos-latest
timeout-minutes: 45
env:
- BUILD_OPTIONS: 'modules.cpp.compilerWrapper:ccache modules.qbs.debugInformation:true modules.qbsbuildconfig.enableAddressSanitizer:false modules.qbsbuildconfig.enableBundledQt:true'
+ BUILD_OPTIONS: |
+ modules.cpp.compilerWrapper:ccache
+ modules.qbs.debugInformation:true
+ modules.qbsbuildconfig.enableAddressSanitizer:false
+ modules.qbsbuildconfig.enableBundledQt:true
+ products.qbs_archive.targetName:qbs-macos-${{ github.run_id }}
+ products.qbs_archive.includeTests:true
WITH_TESTS: 0
steps:
- uses: actions/checkout@v1
@@ -148,20 +156,23 @@ jobs:
run: scripts/build-qbs-with-qbs.sh
- name: Print ccache stats
run: ccache -s
- - name: Create acrhive
- run: tar -C release/install-root/ -cJf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz usr/local
- name: Upload artifacts
uses: 'actions/upload-artifact@v2'
with:
- name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
- path: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
+ name: qbs-macos-${{ github.run_id }}.tar.gz
+ path: release/qbs-macos-${{ github.run_id }}.tar.gz
build-windows:
name: Build on Windows
runs-on: windows-latest
timeout-minutes: 45
env:
- BUILD_OPTIONS: 'modules.cpp.compilerWrapper:clcache modules.qbsbuildconfig.enableAddressSanitizer:false modules.qbsbuildconfig.enableBundledQt:true'
+ BUILD_OPTIONS: |
+ modules.cpp.compilerWrapper:clcache
+ modules.qbsbuildconfig.enableAddressSanitizer:false
+ modules.qbsbuildconfig.enableBundledQt:true
+ products.qbs_archive.targetName:qbs-windows-${{ github.run_id }}
+ products.qbs_archive.includeTests:true,
WITH_TESTS: 0
steps:
- uses: actions/checkout@v1
@@ -200,14 +211,11 @@ jobs:
shell: bash
- name: Print clcache stats
run: clcache -s
- - name: Create acrhive
- run: 7z a qbs-${{ runner.os }}-${{ github.run_id }}.7z release/install-root/ -r
- shell: bash
- name: Upload artifacts
uses: 'actions/upload-artifact@v2'
with:
- name: qbs-${{ runner.os }}-${{ github.run_id }}.7z
- path: qbs-${{ runner.os }}-${{ github.run_id }}.7z
+ name: qbs-windows-${{ github.run_id }}.zip
+ path: release/qbs-windows-${{ github.run_id }}.zip
test-linux:
name: ${{ matrix.config.name }}
@@ -251,10 +259,10 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v1
with:
- name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
+ name: qbs-linux-${{ github.run_id }}.tar.gz
path: ./
- name: Unpack artifact
- run: mkdir -p release/install-root/ && tar xf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz -C release/install-root/
+ run: mkdir -p release/install-root/ && tar xzf qbs-linux-${{ github.run_id }}.tar.gz -C release/install-root/
- name: Pull the Docker Image
run: docker-compose pull ${{ matrix.config.image }}
- name: Run tests
@@ -272,10 +280,10 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v1
with:
- name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
+ name: qbs-linux-${{ github.run_id }}.tar.gz
path: ./
- name: Unpack artifact
- run: mkdir -p release/install-root/ && tar xf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz -C release/install-root/
+ run: mkdir -p release/install-root/ && tar xzf qbs-linux-${{ github.run_id }}.tar.gz -C release/install-root/
- name: Pull the Focal-Baremetal Image
run: docker-compose pull focal-baremetal
- name: arm-none-eabi-gcc-9_2
@@ -325,10 +333,10 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v1
with:
- name: qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz
+ name: qbs-macos-${{ github.run_id }}.tar.gz
path: ./
- name: Unpack artifact
- run: mkdir -p release/install-root/ && tar xf qbs-${{ runner.os }}-${{ github.run_id }}.tar.xz -C release/install-root/
+ run: mkdir -p release/install-root/ && tar xzf qbs-macos-${{ github.run_id }}.tar.gz -C release/install-root/
- name: Update PATH
run: echo ::add-path::./release/install-root/usr/local/bin
- name: Install required packages
@@ -378,10 +386,13 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v1
with:
- name: qbs-${{ runner.os }}-${{ github.run_id }}.7z
+ name: qbs-windows-${{ github.run_id }}.zip
path: ./
- name: Unpack artifact
- run: 7z x qbs-${{ runner.os }}-${{ github.run_id }}.7z
+ run: |
+ mkdir -p release/install-root
+ cd release/install-root
+ 7z x ../../qbs-windows-${{ github.run_id }}.zip
shell: bash
- name: Update PATH
run: echo ::add-path::./release/install-root/bin
diff --git a/docker-compose.yml b/docker-compose.yml
index 5af210210..5d7c227c1 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,6 +7,7 @@ x-default-service: &linux
- QTEST_FUNCTION_TIMEOUT
- QBS_AUTOTEST_PROFILE
- QBS_TEST_SOURCE_ROOT
+ - WITH_ARCHIVE
- WITH_TESTS
volumes:
- .:/qbs
diff --git a/scripts/build-qbs-with-qbs.sh b/scripts/build-qbs-with-qbs.sh
index 68832036a..32241a3a2 100755
--- a/scripts/build-qbs-with-qbs.sh
+++ b/scripts/build-qbs-with-qbs.sh
@@ -78,9 +78,9 @@ if [ "$WITH_DOCS" -ne 0 ]; then
qbs build -p "qbs documentation" ${BUILD_OPTIONS}
fi
-WITH_ARCHIVE=${WITH_ARCHIVE:-0}
+WITH_ARCHIVE=${WITH_ARCHIVE:-1}
if [ "$WITH_ARCHIVE" -ne 0 ]; then
- qbs build -p dist ${BUILD_OPTIONS} "products.qbs archive.includeTopLevelDir:true"
+ qbs build -p "qbs_archive" ${BUILD_OPTIONS}
fi
WITH_TESTS=${WITH_TESTS:-1}
diff --git a/scripts/make-release-archives.bat b/scripts/make-release-archives.bat
index 0970d2702..ce889a9ca 100644
--- a/scripts/make-release-archives.bat
+++ b/scripts/make-release-archives.bat
@@ -67,7 +67,7 @@ subst Q: "%CD%" && Q:
qbs build --settings-dir "%builddir%\.settings"^
-f qbs.qbs -d "%builddir%\build"^
- -p dist qbs.buildVariant:release project.withDocumentation:false "products.qbs archive.includeTopLevelDir:true"^
+ -p dist qbs.buildVariant:release project.withDocumentation:false products.qbs_archive.includeTopLevelDir:true^
modules.qbsbuildconfig.enableBundledQt:true^
config:release "qbs.installRoot:%builddir%\qbs-windows-x86-%version%" profile:qt^
config:release-64 "qbs.installRoot:%builddir%\qbs-windows-x86_64-%version%" profile:qt64 || exit /b
diff --git a/src/packages/archive/archive.qbs b/src/packages/archive/archive.qbs
index 9a9b09ba7..430f1ff15 100644
--- a/src/packages/archive/archive.qbs
+++ b/src/packages/archive/archive.qbs
@@ -15,13 +15,15 @@ QbsProduct {
condition: qbs.targetOS.contains("unix") && project.withDocumentation
}
Depends { productTypes: ["qbsapplication", "qbsplugin"] }
+ Depends { productTypes: ["autotest"]; condition: includeTests }
Depends { name: "archiver" }
property bool includeTopLevelDir: false
+ property bool includeTests: false
builtByDefault: false
- name: "qbs archive"
+ name: "qbs_archive"
type: ["archiver.archive"]
targetName: "qbs-" + qbs.targetOS[0] + "-" + qbs.architecture + "-" + qbsversion.version
destinationDirectory: project.buildDirectory
diff --git a/src/packages/packages.qbs b/src/packages/packages.qbs
index 12ca8b041..aa740aafe 100644
--- a/src/packages/packages.qbs
+++ b/src/packages/packages.qbs
@@ -8,7 +8,7 @@ Project {
// Virtual product for building all possible packagings
Product {
- Depends { name: "qbs archive"; required: false }
+ Depends { name: "qbs_archive"; required: false }
Depends { name: "qbs chocolatey"; required: false }
name: "dist"
builtByDefault: false