Skip to content

Commit

Permalink
ci(macos+linux): tar artifact and add executable test
Browse files Browse the repository at this point in the history
  • Loading branch information
codeflorist committed Dec 7, 2023
1 parent 41f8849 commit 5b166df
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ jobs:
- name: Bundle libs
run: ./scripts/bundle-libs-linux.sh

- name: Test executable
run: |
cd dist
./dunedynasty | grep "data directory"
- name: Tar files
run: tar -cvf dist.tar dist

- name: Delete Old Artifacts
uses: actions/github-script@v6
id: artifact
Expand All @@ -42,4 +50,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: linux-build
path: dist
path: dist.tar
5 changes: 4 additions & 1 deletion .github/workflows/macos-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Bundle libs
run: ./scripts/bundle-libs-macos.sh

- name: Tar files
run: tar -cvf dist.tar dist

- name: Delete Old Artifacts
uses: actions/github-script@v6
id: artifact
Expand All @@ -50,4 +53,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: macos-arm64-build
path: dist
path: dist.tar
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: macOS Intel Build
name: macOS X86-64 Build
on: [push, pull_request]

jobs:
Expand All @@ -18,6 +18,14 @@ jobs:
- name: Bundle libs
run: ./scripts/bundle-libs-macos.sh

- name: Test executable
run: |
brew uninstall --force --ignore-dependencies argtable sdl2 dumb libogg flac libpng freetype libvorbis ca-certificates openssl@3 opus opusfile physfs theora giflib jpeg-turbo xz lz4 zstd libtiff webp pcre2 gettext glib lame mpg123 libsndfile portaudio readline allegro fluid-synth mad enet
./dist/dunedynasty | grep "data directory"
- name: Tar files
run: tar -cvf dist.tar dist

- name: Delete Old Artifacts
uses: actions/github-script@v6
id: artifact
Expand All @@ -29,7 +37,7 @@ jobs:
})
res.data.artifacts
.filter(({ name }) => name === 'macos-intel-build')
.filter(({ name }) => name === 'macos-x86-64-build')
.forEach(({ id }) => {
github.rest.actions.deleteArtifact({
owner: context.repo.owner,
Expand All @@ -41,5 +49,5 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: macos-intel-build
path: dist
name: macos-x86-64-build
path: dist.tar

0 comments on commit 5b166df

Please sign in to comment.