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

Use matrix to simplify packaging workflow #1053

Merged
merged 2 commits into from
Jun 18, 2023
Merged
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
87 changes: 14 additions & 73 deletions .github/workflows/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ jobs:
path: Axolotl-x86_64.AppImage
retention-days: 5

package-click-armhf:
name: Package as click armhf
package-click:
strategy:
matrix:
arch: [armhf, arm64, amd64]
name: Package as click ${{ matrix.arch }}
runs-on: ubuntu-latest

steps:
Expand All @@ -70,82 +73,20 @@ jobs:
mkdir $GITHUB_WORKSPACE/axolotl-web/dist
cp -rf build-artifacts/axolotl-web/* $GITHUB_WORKSPACE/axolotl-web/dist

- name: Build click (armhf)
uses: docker://clickable/ci-20.04-armhf:7.11.0
env:
GOPATH: $GITHUB_WORKSPACE/go
with:
args: clickable build --verbose -a armhf --app

- name: Upload the built click artifact (armhf)
uses: actions/upload-artifact@v3
with:
name: Axolotl-Clickable
path: build/arm-linux-gnueabihf/app/textsecure.nanuc_*.click
retention-days: 1

package-click-arm64:
name: Package as click arm64
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Download axolotl and axolotl-web build artifacts
uses: actions/download-artifact@v3
with:
path: build-artifacts

- name: Put axolotl web in place
run: |
mkdir $GITHUB_WORKSPACE/axolotl-web/dist
cp -rf build-artifacts/axolotl-web/* $GITHUB_WORKSPACE/axolotl-web/dist

- name: Build click (arm64)
uses: docker://clickable/ci-20.04-arm64:7.11.0
env:
GOPATH: $GITHUB_WORKSPACE/go
with:
args: clickable build --verbose -a arm64 --app

- name: Upload the built click artifact (amd64)
uses: actions/upload-artifact@v3
with:
name: Axolotl-Clickable
path: build/aarch64-linux-gnu/app/textsecure.nanuc_*.click
retention-days: 1

package-click-amd64:
name: Package as click amd64
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Download axolotl and axolotl-web build artifacts
uses: actions/download-artifact@v3
with:
path: build-artifacts

- name: Put axolotl web in place
run: |
mkdir $GITHUB_WORKSPACE/axolotl-web/dist
cp -rf build-artifacts/axolotl-web/* $GITHUB_WORKSPACE/axolotl-web/dist

- name: Build click (amd64)
uses: docker://clickable/ci-20.04-amd64:7.11.0
env:
GOPATH: $GITHUB_WORKSPACE/go
- name: Build click (${{ matrix.arch }})
# workaround https://github.com/actions/runner/issues/1479#issuecomment-969306629
uses: ChristopherHX/conditional@b4a9649204f81002ec9a4ef7d4bf7d6b2ab7fa55
with:
args: clickable build --verbose -a amd64 --app
step: |
uses: docker://clickable/ci-20.04-${{ matrix.arch }}:7.11.0
with:
args: clickable build --verbose -a ${{ matrix.arch }} --app

- name: Upload the built click artifact (amd64)
- name: Upload the built click artifact (${{ matrix.arch }})
uses: actions/upload-artifact@v3
with:
name: Axolotl-Clickable
path: build/x86_64-linux-gnu/app/textsecure.nanuc_*.click
path: build/*/app/textsecure.nanuc_*.click
retention-days: 1

package-flatpak-web:
Expand Down
Loading