-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): abolish builds for too old glibc.
Signed-off-by: Luca Di Maio <[email protected]>
- Loading branch information
1 parent
b9b69d8
commit 0805daf
Showing
2 changed files
with
20 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,11 +108,6 @@ jobs: | |
target: x86_64-pc-windows-msvc | ||
arch: amd64 | ||
cli_only: false | ||
- host: ubuntu-20.04 | ||
target: x86_64-unknown-linux-gnu | ||
os: linux | ||
arch: amd64 | ||
cli_only: false | ||
- host: ubuntu-22.04 | ||
target: x86_64-unknown-linux-gnu | ||
os: linux | ||
|
@@ -144,7 +139,7 @@ jobs: | |
working-directory: "./desktop" | ||
|
||
- name: Setup System Dependencies | ||
if: ( matrix.settings.host == 'ubuntu-22.04' || matrix.settings.host == 'ubuntu-20.04' ) && matrix.settings.cli_only == false | ||
if: matrix.settings.host == 'ubuntu-22.04' && matrix.settings.cli_only == false | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev | ||
|
@@ -199,28 +194,11 @@ jobs: | |
run: yarn install | ||
working-directory: "./desktop" | ||
|
||
- name: Build Desktop App (linux glibc old) | ||
if: matrix.settings.host == 'ubuntu-20.04' && matrix.settings.cli_only == false | ||
uses: tauri-apps/[email protected] | ||
with: | ||
releaseId: glibc_old_${{ needs.create-release.outputs.release_id }} | ||
projectPath: "./desktop" | ||
args: "--config src-tauri/tauri-linux.conf.json --target ${{ matrix.settings.target }} --features enable-updater --bundles appimage,updater" | ||
includeUpdaterJson: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} | ||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} | ||
# AppImage Signing: | ||
SIGN: ${{ secrets.APP_IMAGE_SIGN }} | ||
SIGN_KEY: ${{ secrets.APP_IMAGE_SIGN_KEY }} | ||
APPIMAGETOOL_SIGN_PASSPHRASE: ${{ secrets.APP_IMAGE_SIGN_PASSPHRASE }} | ||
|
||
- name: Build Desktop App (linux glibc new) | ||
- name: Build Desktop App | ||
if: matrix.settings.host == 'ubuntu-22.04' && matrix.settings.cli_only == false | ||
uses: tauri-apps/[email protected] | ||
with: | ||
releaseId: glibc_new_${{ needs.create-release.outputs.release_id }} | ||
releaseId: ${{ needs.create-release.outputs.release_id }} | ||
projectPath: "./desktop" | ||
args: "--config src-tauri/tauri-linux.conf.json --target ${{ matrix.settings.target }} --features enable-updater --bundles appimage,updater" | ||
includeUpdaterJson: true | ||
|
@@ -254,23 +232,14 @@ jobs: | |
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} | ||
|
||
- name: Build linux tar.gz (glibc old) | ||
if: matrix.settings.host == 'ubuntu-20.04' && matrix.settings.cli_only == false | ||
id: build-desktop-targz-glibc-old | ||
run: | | ||
cd ./desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/appimage/dev-pod.AppDir || exit 1 | ||
tar --exclude=usr/bin/xdg-open --exclude=usr/lib --exclude=usr/share/doc --exclude=usr/share/glib-2.0 -zcvf dev-pod-desktop.tar.gz usr | ||
mv dev-pod-desktop.tar.gz ../../dev-pod-glibc-old-${{needs.create-release.outputs.package_version}}.tar.gz | ||
- name: Build linux tar.gz (glibc new) | ||
- name: Build linux tar.gz | ||
if: matrix.settings.host == 'ubuntu-22.04' && matrix.settings.cli_only == false | ||
id: build-desktop-targz-glibc-new | ||
id: build-desktop-targz | ||
run: | | ||
cd ./desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/appimage/dev-pod.AppDir || exit 1 | ||
tar --exclude=usr/bin/xdg-open --exclude=usr/lib --exclude=usr/share/doc --exclude=usr/share/glib-2.0 -zcvf dev-pod-desktop.tar.gz usr | ||
mv dev-pod-desktop.tar.gz ../../dev-pod-glibc-new-${{needs.create-release.outputs.package_version}}.tar.gz | ||
mv dev-pod-desktop.tar.gz ../../dev-pod-${{needs.create-release.outputs.package_version}}.tar.gz | ||
- name: Build Desktop App | ||
if: matrix.settings.host == 'windows-latest' && matrix.settings.cli_only == false | ||
|
@@ -357,7 +326,7 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload CLI Asset | ||
if: matrix.settings.host != 'windows-latest' && matrix.settings.host != 'ubuntu-20.04' | ||
if: matrix.settings.host != 'windows-latest' | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
|
@@ -383,132 +352,15 @@ jobs: | |
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload AppImage Assets (glibc old) | ||
if: matrix.settings.host == 'ubuntu-20.04' && matrix.settings.cli_only == false | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const fs = require("fs") | ||
const releaseId = "${{ needs.create-release.outputs.release_id }}" | ||
const assetName = "dev-pod_${{needs.create-release.outputs.package_version}}_amd64.AppImage" | ||
const assetUploadName = "dev-pod-glibc-old_${{needs.create-release.outputs.package_version}}_amd64.AppImage" | ||
const assetPath = `desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/appimage/${assetName}` | ||
const tarAssetName = "dev-pod_${{needs.create-release.outputs.package_version}}_amd64.AppImage.tar.gz" | ||
const tarAssetUploadName = "dev-pod-glibc-old_${{needs.create-release.outputs.package_version}}_amd64.AppImage.tar.gz" | ||
const tarAssetPath = `desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/appimage/${tarAssetName}` | ||
console.log("Attempting to upload release asset: ", assetName) | ||
await github.rest.repos.uploadReleaseAsset({ | ||
headers: { | ||
"content-type": "application/zip", | ||
"content-length": fs.statSync(assetPath).size | ||
}, | ||
name: assetUploadName, | ||
data: fs.readFileSync(assetPath), | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: releaseId | ||
}) | ||
await github.rest.repos.uploadReleaseAsset({ | ||
headers: { | ||
"content-type": "application/zip", | ||
"content-length": fs.statSync(assetPath).size | ||
}, | ||
name: tarAssetUploadName, | ||
data: fs.readFileSync(tarAssetPath), | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: releaseId | ||
}) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload AppImage Assets (glibc new) | ||
if: matrix.settings.host == 'ubuntu-22.04' && matrix.settings.cli_only == false | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const fs = require("fs") | ||
const releaseId = "${{ needs.create-release.outputs.release_id }}" | ||
const assetName = "dev-pod_${{needs.create-release.outputs.package_version}}_amd64.AppImage" | ||
const assetUploadName = "dev-pod-glibc-new_${{needs.create-release.outputs.package_version}}_amd64.AppImage" | ||
const assetPath = `desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/appimage/${assetName}` | ||
const tarAssetName = "dev-pod_${{needs.create-release.outputs.package_version}}_amd64.AppImage.tar.gz" | ||
const tarAssetUploadName = "dev-pod-glibc-new_${{needs.create-release.outputs.package_version}}_amd64.AppImage.tar.gz" | ||
const tarAssetPath = `desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/appimage/${tarAssetName}` | ||
console.log("Attempting to upload release asset: ", assetName) | ||
await github.rest.repos.uploadReleaseAsset({ | ||
headers: { | ||
"content-type": "application/zip", | ||
"content-length": fs.statSync(assetPath).size | ||
}, | ||
name: assetUploadName, | ||
data: fs.readFileSync(assetPath), | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: releaseId | ||
}) | ||
await github.rest.repos.uploadReleaseAsset({ | ||
headers: { | ||
"content-type": "application/zip", | ||
"content-length": fs.statSync(assetPath).size | ||
}, | ||
name: tarAssetUploadName, | ||
data: fs.readFileSync(tarAssetPath), | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: releaseId | ||
}) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload Tar.gz Asset (glibc old) | ||
if: matrix.settings.host == 'ubuntu-20.04' && matrix.settings.cli_only == false | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const fs = require("fs") | ||
const releaseId = "${{ needs.create-release.outputs.release_id }}" | ||
const assetName = "dev-pod-glibc-old-${{needs.create-release.outputs.package_version}}.tar.gz" | ||
const assetPath = `desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/${assetName}` | ||
console.log("Attempting to upload release asset: ", assetName) | ||
await github.rest.repos.uploadReleaseAsset({ | ||
headers: { | ||
"content-type": "application/zip", | ||
"content-length": fs.statSync(assetPath).size | ||
}, | ||
name: assetName, | ||
data: fs.readFileSync(assetPath), | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: releaseId | ||
}) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload Tar.gz Asset (glibc new) | ||
- name: Upload Tar.gz Asset | ||
if: matrix.settings.host == 'ubuntu-22.04' && matrix.settings.cli_only == false | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const fs = require("fs") | ||
const releaseId = "${{ needs.create-release.outputs.release_id }}" | ||
const assetName = "dev-pod-glibc-new-${{needs.create-release.outputs.package_version}}.tar.gz" | ||
const assetName = "dev-pod-${{needs.create-release.outputs.package_version}}.tar.gz" | ||
const assetPath = `desktop/src-tauri/target/${{ matrix.settings.target }}/release/bundle/${assetName}` | ||
console.log("Attempting to upload release asset: ", assetName) | ||
|
@@ -606,15 +458,11 @@ jobs: | |
const winVersion = latest.version.replace("-", ".") | ||
const infos = [ | ||
{ target: "linux-x86_64", sigFile: ".AppImage.tar.gz.sig", packageType: ".tar.gz", originalAssetName: `dev-pod-glibc-old_${version}_amd64.AppImage`, desiredAssetName: "DevPod_linux_glibc_old_amd64.AppImage" }, | ||
{ target: "linux-x86_64", sigFile: ".AppImage.tar.gz.sig", packageType: ".tar.gz", originalAssetName: `dev-pod-glibc-new_${version}_amd64.AppImage`, desiredAssetName: "DevPod_linux_glibc_new_amd64.AppImage" }, | ||
{ target: "linux-x86_64", sigFile: ".AppImage.tar.gz.sig", packageType: ".tar.gz", originalAssetName: `dev-pod_${version}_amd64.AppImage`, desiredAssetName: "DevPod_linux_amd64.AppImage" }, | ||
{ target: "darwin-aarch64", sigFile: "aarch64.app.tar.gz.sig", packageType: ".tar.gz", originalAssetName: `DevPod_${version}_aarch64.dmg`, desiredAssetName: "DevPod_macos_aarch64.dmg", originalUpdaterAssetName: "DevPod_aarch64.app.tar.gz", desiredUpdaterAssetName: "DevPod_macos_aarch64.app.tar.gz" }, | ||
{ target: "darwin-x86_64", sigFile: "x64.app.tar.gz.sig", packageType: ".tar.gz", originalAssetName: `DevPod_${version}_x64.dmg`, desiredAssetName: "DevPod_macos_x64.dmg", originalUpdaterAssetName: "DevPod_x64.app.tar.gz", desiredUpdaterAssetName: "DevPod_macos_x64.app.tar.gz" }, | ||
{ target: "windows-x86_64", sigFile: ".msi.zip.sig", packageType: ".zip", originalAssetName: `DevPod_${winVersion}_x64_en-US.msi`, desiredAssetName: "DevPod_windows_x64_en-US.msi" }, | ||
{ originalAssetName: `dev-pod-glibc-new-${version}.tar.gz`, desiredAssetName: "DevPod_linux_glibc_new_x86_64.tar.gz" }, | ||
{ originalAssetName: `dev-pod-glibc-old-${version}.tar.gz`, desiredAssetName: "DevPod_linux_glibc_old_x86_64.tar.gz" }, | ||
{ originalAssetName: `dev-pod-glibc-new-${version}_amd64.AppImage`, desiredAssetName: "DevPod_linux_glibc_new_x86_64.AppImage" }, | ||
{ originalAssetName: `dev-pod-glibc-old-${version}_amd64.AppImage`, desiredAssetName: "DevPod_linux_glibc_old_x86_64.AppImage" }, | ||
{ originalAssetName: `dev-pod-${version}.tar.gz`, desiredAssetName: "DevPod_linux_x86_64.tar.gz" }, | ||
] | ||
for (const info of infos) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters