Merge remote-tracking branch 'upstream/master' #492
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
name: CI | |
on: [push, pull_request] | |
jobs: | |
windows: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.10.11 | |
- name: Builder image | |
env: | |
TARGET_OS: Windows | |
run: docker build -t electrum-grs-wine-builder-img ./contrib/build-wine/ | |
- name: Compile Windows binary | |
env: | |
TARGET_OS: Windows | |
run: docker run --name electrum-grs-wine-builder-cont -v $PWD:/opt/wine64/drive_c/electrum-grs --rm --workdir /opt/wine64/drive_c/electrum-grs/contrib/build-wine electrum-grs-wine-builder-img ./make_win.sh | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-windows | |
path: contrib/build-wine/dist/*.exe | |
if-no-files-found: error | |
retention-days: 7 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-windows | |
appimage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.10.11 | |
- name: Builder image | |
run: docker build -t electrum-grs-appimage-builder-img ./contrib/build-linux/appimage/ | |
- name: Compile Linux AppImage | |
run: docker run --name electrum-grs-appimage-builder-cont -v $PWD:/opt/electrum-grs --rm --workdir /opt/electrum-grs/contrib/build-linux/appimage electrum-grs-appimage-builder-img ./make_appimage.sh | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-appimage | |
path: dist/*.AppImage | |
if-no-files-found: error | |
retention-days: 7 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-appimage | |
tarball: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Builder image | |
run: docker build -t electrum-grs-sdist-builder-img ./contrib/build-linux/sdist/ | |
- name: Compile Linux tarball | |
run: docker run --name electrum-grs-sdist-builder-cont -v $PWD:/opt/electrum-grs --rm --workdir /opt/electrum-grs/contrib/build-linux/sdist electrum-grs-sdist-builder-img ./make_sdist.sh | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-tarball | |
path: dist/*.tar.gz | |
if-no-files-found: error | |
retention-days: 7 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-tarball | |
source-only-tarball: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Builder image | |
run: docker build -t electrum-grs-source-only-tarball-builder-img ./contrib/build-linux/sdist/ | |
- name: Compile Linux tarball | |
run: docker run --name electrum-grs-source-only-tarball-builder-cont -v $PWD:/opt/electrum-grs --rm --workdir /opt/electrum-grs/contrib/build-linux/sdist --env OMIT_UNCLEAN_FILES=1 electrum-grs-source-only-tarball-builder-img ./make_sdist.sh | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-source-only-tarball | |
path: dist/*.tar.gz | |
if-no-files-found: error | |
retention-days: 7 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-source-only-tarball | |
android-qml-all: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Free Disk Space (Ubuntu) | |
uses: gruve-p/free-disk-space@main | |
with: | |
# this might remove tools that are actually needed, | |
# if set to "true" but frees about 6 GB | |
tool-cache: true | |
# all of these default to true, but feel free to set to | |
# "false" if necessary for your workflow | |
android: true | |
dotnet: true | |
haskell: true | |
docker-images: true | |
codeql-images: true | |
large-packages: true | |
swap-storage: true | |
- name: Builder image | |
run: docker build -t electrum-grs-android-builder-img --file contrib/android/Dockerfile . | |
- name: Compile Android apk | |
env: | |
ENCODED_STRING: ${{ secrets.ANDROID_SIGNING_KEY }} | |
run: | | |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore | |
mkdir "${TMP_KEYSTORE_FILE_PATH}" | |
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/electrumgrs.keystore | |
sudo mkdir --parents /.buildozer/.gradle | |
sudo docker run --name electrum-grs-android-builder-cont -v $PWD:/home/user/wspace/electrum-grs -v /.buildozer/.gradle:/home/user/.gradle -v $TMP_KEYSTORE_FILE_PATH:/root/.keystore --workdir /home/user/wspace/electrum-grs electrum-grs-android-builder-img ./contrib/android/make_apk.sh qml all release ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-android-qml | |
path: dist/*.apk | |
if-no-files-found: error | |
retention-days: 7 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-android-qml | |
macos: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.10.11 | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: 12.4.0 | |
- name: Compile OSX dmg | |
run: ./contrib/osx/make_osx.sh | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-macos | |
path: dist/*.dmg | |
if-no-files-found: error | |
retention-days: 7 | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: electrum-grs-${{ github.sha }}-macos |