Skip to content

Commit

Permalink
Merge pull request #1053 from darkdragon-001/improve-packaging
Browse files Browse the repository at this point in the history
Use matrix to simplify packaging workflow
  • Loading branch information
nanu-c authored Jun 18, 2023
2 parents b2cb622 + 3586277 commit 55e3b43
Showing 1 changed file with 14 additions and 73 deletions.
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

0 comments on commit 55e3b43

Please sign in to comment.