Skip to content
Open
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
35 changes: 25 additions & 10 deletions .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- "release/**"
- "fullbuild"
- "desktopbuild"
- "fix/desktop-action"
tags:
- "v*"
schedule:
Expand All @@ -29,6 +30,13 @@ jobs:
cache-key-suffix: "-windows-${{ steps.goversion.outputs.version }}"

- run: sudo apt-get update && sudo apt-get install -y gcc-aarch64-linux-gnu

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}

- run: make DESKTOP/linux

Expand All @@ -52,6 +60,13 @@ jobs:
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-windows-${{ steps.goversion.outputs.version }}"

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}

- run: make DESKTOP/darwin

Expand All @@ -75,18 +90,18 @@ jobs:
with:
go-version: "${{ steps.goversion.outputs.version }}"
cache-key-suffix: "-windows-${{ steps.goversion.outputs.version }}"

- run: |
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
env:
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}

- name: Install oomobile
run: |
go install github.com/ooni/oomobile/cmd/gomobile@latest
go install github.com/ooni/oomobile/cmd/gobind@latest
go get github.com/ooni/oomobile/bind@latest

- name: Init oomobile
run: gomobile init
- name: Add Git Bash to PATH
run: echo "C:\Program Files\Git\bin" >> $env:GITHUB_PATH

- name: Run bind
run: gomobile bind -target java/amd64 -o DESKTOP/oonimkall.jar ./pkg/oonimkall
- run: make DESKTOP/windows

- uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ ios: search/for/zip search/for/xcode
#help: The `make DESKTOP/windows` command builds the oonimkall jar for windows.
.PHONY: DESKTOP/windows
DESKTOP/windows: search/for/java
./script/go.bash run ./internal/cmd/buildtool desktop oomobile --target=windows
go run ./internal/cmd/buildtool desktop oomobile --target=windows

#help:
#help: The `make DESKTOP/darwin` command builds the oonimkall jar for darwin.
Expand Down
4 changes: 4 additions & 0 deletions internal/cmd/buildtool/desktop.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"fmt"
"path/filepath"
"runtime"

Expand Down Expand Up @@ -35,6 +36,7 @@ func desktopSubcommand() *cobra.Command {

// desktopBuildOomobile invokes the oomobile build.
func desktopBuildOomobile(deps buildtoolmodel.Dependencies, targetOs string) {
fmt.Println(targetOs)
deps.PsiphonMaybeCopyConfigFiles()
deps.GolangCheck()

Expand All @@ -47,6 +49,8 @@ func desktopBuildOomobile(deps buildtoolmodel.Dependencies, targetOs string) {
}
config.envp.Append("GOOS", targetOs)

fmt.Println(targetOs)

// NOTE: we only support windows builds on amd64 for now
if targetOs == "windows" {
log.Infof("detected GOOS: %s, setting target as amd64", runtime.GOOS)
Expand Down
Loading