Skip to content

Commit 75a639d

Browse files
committed
INTERNAL: Updating changelog, Github workflow.
Also rolling back those workflow changes.
1 parent e884d4c commit 75a639d

7 files changed

Lines changed: 380 additions & 355 deletions

File tree

.github/workflows/main.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
sudo apt install libasound2-dev
2121
2222
- name: Build
23-
run: go run ./build_script/main.go -b -c
23+
run: |
24+
go run build_script/build.go -b -c
2425
2526
- uses: actions/upload-artifact@v4
2627
with:
@@ -32,8 +33,8 @@ jobs:
3233
name: _gh-actions-masterplan-linux-demo-amd64-v0.9
3334
path: ./bin/linux-0.9-Demo-amd64.tar.gz
3435

35-
- name: Test
36-
run: go run .
36+
# - name: Test
37+
# run: timeout 10s go run .
3738

3839
# For some reason, building on Windows creates a terminal window despite specifying -H=windowsgui in the build settings. For now, I'll crosscompile on my machine.
3940

@@ -54,7 +55,8 @@ jobs:
5455
run: pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-go --noconfirm
5556

5657
- name: Build
57-
run: go run ./build_script/main.go -b -c
58+
run: |
59+
go run build_script/build.go -b -c
5860
5961
- uses: actions/upload-artifact@v4
6062
with:
@@ -66,8 +68,11 @@ jobs:
6668
name: _GH-Actions-MasterPlan-Windows-amd64-Demo-v0.9
6769
path: ./bin/windows-0.9-Demo-amd64.zip
6870

69-
- name: Test
70-
run: go run .
71+
# - name: Test
72+
# run: |
73+
# start go run .
74+
# timeout /t 10
75+
# taskkill /im go /f
7176

7277
buildMacAmd64:
7378
runs-on: macos-13 # Earliest MacOS, deprecated
@@ -83,13 +88,13 @@ jobs:
8388
run: brew install pkg-config dylibbundler
8489

8590
- name: Build
86-
run: go run ./build_script/main.go -b
91+
run: go run build_script/build.go -b
8792

8893
- name: Bundle Dependencies
8994
run: dylibbundler -od -b -x ./bin/darwin-0.9-Release-amd64/MasterPlan.app/Contents/MacOS/masterplan -d ./bin/darwin-0.9-Release-amd64/MasterPlan.app/Contents/libs -p @executable_path/../libs
9095

9196
- name: Compress
92-
run: go run ./build_script/main.go -c
97+
run: go run build_script/build.go -c
9398

9499
- uses: actions/upload-artifact@v4
95100
with:
@@ -101,8 +106,8 @@ jobs:
101106
name: _GH-Actions-MasterPlan-MacOS-Demo-amd64-v0.9
102107
path: ./bin/darwin-0.9-Release-amd64.tar.gz
103108

104-
- name: Test
105-
run: go run .
109+
# - name: Test
110+
# run: go run .
106111

107112
buildMacArm64:
108113
runs-on: macos-14 # Deprecated, earliest ARM64 on GH Runners
@@ -118,13 +123,13 @@ jobs:
118123
run: brew install pkg-config dylibbundler
119124

120125
- name: Build
121-
run: go run ./build_script/main.go -b -os darwin -arch arm64
126+
run: go run build_script/build.go -b -os darwin -arch arm64
122127

123128
- name: Bundle Dependencies
124129
run: dylibbundler -od -b -x ./bin/darwin-0.9-Release-arm64/MasterPlan.app/Contents/MacOS/masterplan -d ./bin/darwin-0.9-Release-arm64/MasterPlan.app/Contents/libs -p @executable_path/../libs
125130

126131
- name: Compress
127-
run: go run ./build_script/main.go -c
132+
run: go run build_script/build.go -c
128133

129134
- uses: actions/upload-artifact@v4
130135
with:
@@ -136,5 +141,5 @@ jobs:
136141
name: _GH-Actions-MasterPlan-MacOS-arm64-Demo-v0.9
137142
path: bin/darwin-0.9-Demo-arm64.tar.gz
138143

139-
- name: Test
140-
run: go run .
144+
# - name: Test
145+
# run: go run .

build_script/build.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ func build(baseDir string, releaseMode string, targetOS, targetArch string) {
3737
panic(err)
3838
}
3939

40-
copyTo(filepath.Join("..", "changelog.txt"), filepath.Join(baseDir, "changelog.txt"))
40+
copyTo("changelog.txt", filepath.Join(baseDir, "changelog.txt"))
4141

4242
if forMac {
4343
baseDir = filepath.Join(baseDir, "MasterPlan.app", "Contents", "MacOS")
4444
}
4545

4646
// Copy the assets folder to the bin directory
4747

48-
copyTo(filepath.Join("..", "assets"), filepath.Join(baseDir, "assets"))
48+
copyTo("assets", filepath.Join(baseDir, "assets"))
4949

5050
fmt.Println("<Assets copied.>")
5151

@@ -96,9 +96,9 @@ func build(baseDir string, releaseMode string, targetOS, targetArch string) {
9696

9797
// Also note that I know it's weird that I'm joining the build script directory here because baseDir is already a folder up; this makes it so
9898
// bin is the running directory
99-
c = exec.Command(`go`, `build`, `-C`, `..`, `-ldflags`, `-s -w -H windowsgui`, `-tags`, releaseMode, `-o`, filepath.Join("build_script", outputFilepath), `.`)
99+
c = exec.Command(`go`, `build`, `-ldflags`, `-s -w -H windowsgui`, `-tags`, releaseMode, `-o`, outputFilepath, `.`)
100100
} else {
101-
c = exec.Command(`go`, `build`, `-C`, `..`, `-ldflags`, `-s -w`, `-tags`, releaseMode, `-o`, filepath.Join("build_script", outputFilepath), `.`)
101+
c = exec.Command(`go`, `build`, `-ldflags`, `-s -w`, `-tags`, releaseMode, `-o`, outputFilepath, `.`)
102102
}
103103

104104
fmt.Println("<Building binary with args: ", c.Args, ".>")
@@ -255,8 +255,8 @@ func main() {
255255
targetArch = *archFlag
256256
}
257257

258-
build(filepath.Join("..", "bin", targetName+"-0.9-Release-"+targetArch), "release", targetName, targetArch)
259-
build(filepath.Join("..", "bin", targetName+"-0.9-Demo-"+targetArch), "demo", targetName, targetArch)
258+
build(filepath.Join("bin", targetName+"-0.9-Release-"+targetArch), "release", targetName, targetArch)
259+
build(filepath.Join("bin", targetName+"-0.9-Demo-"+targetArch), "demo", targetName, targetArch)
260260
}
261261
if *compressMP {
262262
compress() // Compresses all built binary folders in the ./bin folder

build_script/go.mod

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)