Skip to content
Merged
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
10 changes: 4 additions & 6 deletions .github/actions/create-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ inputs:
description: Architecture
required: true
outputs:
package-name:
description: Package name
value: ${{steps.create-package.outputs.package-name}}
output-basename:
description: Output basename
value: ${{steps.create-package.outputs.output-basename}}
runs:
using: composite
steps:
- id: create-package
# XXX: Should use github.action_path here, but it’s currently broken in
# container builds, see https://github.com/actions/runner/issues/716
run: ../.github/actions/create-package/create-package.sh
run: ${GITHUB_ACTION_PATH}/create-package.sh
working-directory: build
shell: bash
env:
Expand Down
10 changes: 3 additions & 7 deletions .github/actions/create-package/create-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ wayland-decoration-client,wayland-graphics-integration-client,wayland-shell-inte
mv Pencil2D*.AppImage.zsync "$output_name.AppImage.zsync" \
&& sed -i '1,/^$/s/^\(Filename\|URL\): .*$/\1: '"$output_name.AppImage/" "$output_name.AppImage.zsync" \
|| true
if [ $IS_RELEASE = "true" ] && [ -e "$output_name.AppImage.zsync" ]; then
echo "::set-output name=package-name::$output_name.AppImage $output_name.AppImage.zsync"
else
echo "::set-output name=package-name::$output_name.AppImage"
fi
echo "::set-output name=output-basename::$output_name"
echo "::endgroup::"
}

Expand Down Expand Up @@ -85,7 +81,7 @@ create_package_macos() {
popd >/dev/null
echo "Create ZIP"
bsdtar caf "pencil2d-mac-$1-$(date +%F).zip" Pencil2D
echo "::set-output name=package-name::pencil2d-mac-$1-$(date +%F).zip"
echo "::set-output name=output-basename::pencil2d-mac-$1-$(date +%F)"
}

create_package_windows() {
Expand All @@ -109,7 +105,7 @@ create_package_windows() {
cp "C:\\Program Files\\OpenSSL\\lib"{ssl,crypto}"-1_1${xbits/-x32/}.dll" Pencil2D/
echo "Create ZIP"
"${WINDIR}\\System32\\tar" caf "pencil2d-${platform}-$1-$(date +%F).zip" Pencil2D
echo "::set-output name=package-name::pencil2d-${platform}-$1-$(date +%F).zip"
echo "::set-output name=output-basename::pencil2d-${platform}-$1-$(date +%F)"
}

"create_package_$(echo $RUNNER_OS | tr '[A-Z]' '[a-z]')" "${GITHUB_RUN_NUMBER}"
8 changes: 5 additions & 3 deletions .github/actions/install-dependencies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ inputs:
runs:
using: composite
steps:
# XXX: Should use github.action_path here, but it’s currently broken in
# container builds, see https://github.com/actions/runner/issues/716
- run: .github/actions/install-dependencies/install-dependencies.sh
- run: ${GITHUB_ACTION_PATH}/install-dependencies.sh
shell: bash
env:
RUNNER_OS: ${{runner.os}}
INPUT_ARCH: ${{inputs.arch}}
- if: runner.os == 'Windows'
uses: jurplel/install-qt-action@v2
with:
arch: ${{inputs.arch}}
14 changes: 1 addition & 13 deletions .github/actions/install-dependencies/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ setup_linux() {
qt515xmlpatterns qt515wayland libgl1-mesa-dev bsdtar ffmpeg \
gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-alsa \
gstreamer1.0-pulseaudio git curl libfuse2 python3 python3-pip
echo "::endgroup::"

echo "::group::Install Python packages"
pip3 install --upgrade oauth2client 'google-api-python-client<2' 'setuptools<58.4' 'pyparsing<3' 'rsa<4.8'
gstreamer1.0-pulseaudio git curl libfuse2
echo "::endgroup::"
}

Expand All @@ -40,10 +36,6 @@ setup_macos() {
brew link qt@5 --force
echo "/usr/local/opt/libarchive/bin" >> "${GITHUB_PATH}"
echo "::endgroup::"

echo "::group::Install Python packages"
sudo pip3 install --upgrade oauth2client google-api-python-client
echo "::endgroup::"
}

setup_windows() {
Expand All @@ -53,10 +45,6 @@ setup_windows() {
choco install openssl.light --force --x86
echo "::endgroup::"
fi

echo "::group::Install Python packages"
pip install --upgrade oauth2client google-api-python-client
echo "::endgroup::"
}

"setup_$(echo "${RUNNER_OS}" | tr '[A-Z]' '[a-z]')"
4 changes: 1 addition & 3 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ inputs:
runs:
using: composite
steps:
# XXX: Should use github.action_path here, but it’s currently broken in
# container builds, see https://github.com/actions/runner/issues/716
- run: .github/actions/setup-environment/setup-environment.sh
- run: ${GITHUB_ACTION_PATH}/setup-environment.sh
shell: bash
env:
RUNNER_OS: ${{runner.os}}
Expand Down
28 changes: 0 additions & 28 deletions .github/actions/upload-package/action.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/actions/upload-package/nightly-build-upload.py

This file was deleted.

48 changes: 0 additions & 48 deletions .github/actions/upload-package/pr-build-upload.py

This file was deleted.

39 changes: 11 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,17 @@ jobs:
# working inside Docker, however so far I haven’t been able to
# figure out precisely *which* privileges are needed.
container: { image: "ubuntu:16.04", options: --privileged }
upload-parent: linux_x86_64_parent
- name: macOS x86_64
os: macos-10.15
container:
upload-parent: macos_x86_64_parent
- name: Windows x86
os: windows-2019
arch: win32_msvc2019
container:
upload-parent: windows_x86_parent
- name: Windows x86_64
os: windows-2019
arch: win64_msvc2019_64
container:
upload-parent: windows_x86_64_parent

name: ${{matrix.name}}
runs-on: ${{matrix.os}}
Expand All @@ -62,12 +58,7 @@ jobs:
apt-get update -yq
apt-get install -yq --no-install-suggests --no-install-recommends git
- name: Check out repository
uses: actions/checkout@v2
- name: Install Qt (Windows)
if: runner.os == 'Windows'
uses: jurplel/install-qt-action@v2
with:
arch: ${{matrix.arch}}
uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/install-dependencies
with:
Expand All @@ -78,20 +69,13 @@ jobs:
with:
arch: ${{matrix.arch}}

- name: Create build directory
run: mkdir build
- name: Configure build (Nightly Build)
if: github.ref != 'refs/heads/release'
working-directory: build
run: qmake ../ PREFIX=/usr CONFIG+=release CONFIG+=GIT CONFIG+=PENCIL2D_NIGHTLY
- name: Configure build (Release)
if: github.ref == 'refs/heads/release'
working-directory: build
run: qmake ../ PREFIX=/usr CONFIG+=release CONFIG+=GIT CONFIG+=PENCIL2D_RELEASE
- name: Configure build
run: mkdir build; qmake -o build PREFIX=/usr CONFIG+=release CONFIG+=GIT
CONFIG+=PENCIL2D_${{github.ref == 'refs/heads/release' && 'RELEASE' || 'NIGHTLY'}}

- name: Build Pencil2D
working-directory: build
run: test "${{runner.os}}" != "Windows" && make || nmake
run: ${{runner.os != 'Windows' && 'make' || 'nmake'}}

- name: Run tests
env: { QT_QPA_PLATFORM: minimal }
Expand All @@ -104,11 +88,10 @@ jobs:
arch: ${{matrix.arch}}

- name: Upload package
env: { GOOGLE_PRIVATE_KEY: "${{secrets.google_private_key}}" }
if: env.GOOGLE_PRIVATE_KEY != null
uses: ./.github/actions/upload-package
uses: actions/upload-artifact@v3
with:
google-private-key: ${{secrets.google_private_key}}
parent: ${{secrets[matrix.upload-parent]}}
path: build
files: ${{steps.package.outputs.package-name}}
name: ${{steps.package.outputs.output-basename}}
path: build/${{steps.package.outputs.output-basename}}*
- name: Generate summary
shell: bash
run: echo "Build will be available for download [here](https://get.pencil2d.org/@${{github.repository_owner}}/${{github.run_id}}/${{steps.package.outputs.output-basename}}) once the run is finished." > "${GITHUB_STEP_SUMMARY}"