Skip to content

new

new #50

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Install rclone
run: |
brew install rclone
- name: Configure rclone
run: |
mkdir -p ~/.config/rclone
echo "[b2]" > ~/.config/rclone/rclone.conf
echo "type = b2" >> ~/.config/rclone/rclone.conf
echo "account = ${{ secrets.B2_KEYID }}" >> ~/.config/rclone/rclone.conf
echo "key = ${{ secrets.B2_APPKEY }}" >> ~/.config/rclone/rclone.conf
- name: Test
run: cat ~/.config/rclone/rclone.conf
- name: Ls
run: "rclone ls b2:"
- name: Set up Rust
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
rustup target add x86_64-apple-darwin
- name: Build GUI
run: |
cd gephgui-wry/gephgui
npm i -f
npm run build
- name: Build macOS
run: |
cd macos
CARGO_BUILD_TARGET=x86_64-apple-darwin ./build-macos.bash
- name: Upload to B2
run: rclone copyto macos/geph-macos.zip b2:geph-dl/STAGING/geph-macos.zip
- uses: actions/upload-artifact@v3
with:
name: geph-macos
path: macos/geph-macos.zip
build_flatpak:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Install dependencies
run: |
sudo apt update
sudo apt install flatpak-builder flatpak ca-certificates
git config --global protocol.file.allow always
- name: Set up Flatpak
run: |
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
- name: Build Flatpak
run: |
flatpak-builder --force-clean --install-deps-from flathub --user build-dir flatpak/io.geph.GephGui.yml --repo=repo
flatpak build-bundle repo io.geph.GephGui.flatpak io.geph.GephGui --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
- name: Install rclone
run: |
sudo -v ; curl https://rclone.org/install.sh | sudo bash
- name: Configure rclone
run: |
mkdir -p ~/.config/rclone
echo "[b2]" > ~/.config/rclone/rclone.conf
echo "type = b2" >> ~/.config/rclone/rclone.conf
echo "account = ${{ secrets.B2_KEYID }}" >> ~/.config/rclone/rclone.conf
echo "key = ${{ secrets.B2_APPKEY }}" >> ~/.config/rclone/rclone.conf
- name: Upload to B2
run: rclone copyto io.geph.GephGui.flatpak b2:geph-dl/STAGING/Geph-x86_64.flatpak
- uses: actions/upload-artifact@v3
with:
name: geph-flatpak
path: io.geph.GephGui.flatpak
build_windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Set up Rust
run: |
curl https://win.rustup.rs/ -o rustup-init.exe
./rustup-init -y --default-toolchain "stable-i686-pc-windows-msvc" --profile minimal
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build GUI
run: |
cd gephgui-wry/gephgui
npm i -f
npm run build
- name: Build Windows
run: |
$env:PATH += ";C:\Users\runneradmin\.cargo\bin"
$env:CARGO_NET_GIT_FETCH_WITH_CLI = "true"
bash windows/build-windows.bash
- name: Install rclone
run: |
Invoke-WebRequest https://downloads.rclone.org/rclone-current-windows-amd64.zip -OutFile rclone.zip
Expand-Archive rclone.zip -DestinationPath .
Move-Item rclone-*-windows-amd64/rclone.exe .
- name: Configure rclone
run: |
New-Item -ItemType Directory -Force -Path $env:USERPROFILE\.config\rclone
@"
[b2]
type = b2
account = ${{ secrets.B2_KEYID }}
key = ${{ secrets.B2_APPKEY }}
"@ | Out-File -FilePath $env:USERPROFILE\.config\rclone\rclone.conf -Encoding ASCII
- name: Upload to B2
run: .\rclone.exe copyto windows/Output/geph-windows-setup.exe b2:geph-dl/STAGING/geph-windows-setup.exe
- uses: actions/upload-artifact@v3
with:
name: geph-windows
path: windows/Output/geph-windows-setup.exe