Skip to content

Commit

Permalink
Add linux and windows builds back into github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismaltby committed Mar 15, 2024
1 parent 9847447 commit e039d2e
Showing 1 changed file with 79 additions and 48 deletions.
127 changes: 79 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,26 @@ on:
workflow_dispatch:

jobs:
test_suite:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "21.6.2"
cache: "yarn"

- name: Install Dependencies
run: |
yarn --ignore-engines
- name: Test
run: |
yarn test
checkout_and_build:
needs: test_suite
runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -18,21 +37,25 @@ jobs:
- name: mac
label: macOS ARM
os: macos-14
# - build: win32
# os: windows-latest
# - build: win64
# os: windows-latest
# - build: linux
# os: ubuntu-latest

# container:
# image: cimg/node:${{ matrix.node_version }}
- name: mac-intel
label: macOS Intel
os: macos-14
- build: win32
label: Windows 32-bit
os: ubuntu-latest
- build: win64
label: Windows 64-bit
os: ubuntu-latest
- build: linux
os: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: "21.6.2"
cache: "yarn"

- name: Setup codesign certificate
if: (matrix.name == 'mac') || (matrix.name == 'mac-intel')
Expand All @@ -47,20 +70,13 @@ jobs:
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PWD" build.keychain
- uses: actions/cache@v4
with:
path: |
./node_modules
./*
key: ${{ runner.os }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-
- name: Install Dependencies
run: |
yarn --ignore-engines
- name: Build Mac
# ==== Builds ====

- name: Build Mac ARM
if: matrix.name == 'mac'
env:
APPLE_ID: ${{ secrets.MAC_NOTARIZE_ID }}
Expand All @@ -74,36 +90,51 @@ jobs:
mkdir -p ./out/keep
mv ./out/make/zip/darwin/arm64/*.zip ./out/keep/gb-studio-${GITHUB_REF##*/}-darwin_arm64.zip
# - name: Build Mac Intel
# if: matrix.name == 'mac-intel'
# run: |
# yarn make:mac-intel

# - name: Build
# run: |
# if [ "${{ matrix.name }}" = "mac" ]; then
# yarn make:mac
# elif [ "${{ matrix.name }}" = "mac-intel" ]; then
# yarn make:mac-intel
# elif [ "${{ matrix.name }}" = "win32" ]; then
# sudo dpkg --add-architecture i386
# sudo apt-get -y update
# sudo apt-get -y install wine wine32 mono-devel
# yarn make:win32
# elif [ "${{ matrix.name }}" = "win64" ]; then
# sudo dpkg --add-architecture i386
# sudo apt-get -y update
# sudo apt-get -y install wine wine32 wine64 mono-devel
# yarn make:win
# elif [ "${{ matrix.name }}" = "linux" ]; then
# sudo apt-get -y update
# sudo apt-get -y install fakeroot rpm squashfs-tools
# yarn make:linux
# fi
- name: Test
if: matrix.name == 'mac'
- name: Build Mac Intel
if: matrix.name == 'mac-intel'
env:
APPLE_ID: ${{ secrets.MAC_NOTARIZE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.MAC_NOTARIZE_PWD }}
APPLE_TEAM_ID: ${{ secrets.MAC_NOTARIZE_TEAM }}
run: |
yarn test
export APPLE_ID=${APPLE_ID}
export APPLE_ID_PASSWORD=${APPLE_ID_PASSWORD}
export APPLE_TEAM_ID=${APPLE_TEAM_ID}
yarn make:mac-intel
mkdir -p ./out/keep
mv ./out/make/zip/darwin/x64/*.zip ./out/keep/gb-studio-${GITHUB_REF##*/}-darwin_x64.zip
- name: Build Linux
if: matrix.name == 'linux'
run: |
yarn make:linux
mkdir -p ./out/keep
mv ./out/make/deb/x64/*.deb ./out/keep/gb-studio-${GITHUB_REF##*/}-linux_x86_64.deb
mv ./out/make/rpm/x64/*.rpm ./out/keep/gb-studio-${GITHUB_REF##*/}-linux_x86_64.rpm
mv ./out/make/AppImage/x64/*.AppImage ./out/keep/gb-studio-${GITHUB_REF##*/}-linux_x86_64.AppImage
- name: Build Win32
if: matrix.name == 'win32'
run: |
sudo dpkg --add-architecture i386
sudo apt-get -y update
sudo apt-get -y install wine wine32 mono-devel
yarn make:win32
mkdir -p ./out/keep
mv ./out/make/zip/win32/ia32/*.zip ./out/keep/gb-studio-${CIRCLE_BRANCH}-windows_x86.zip
mv ./out/make/squirrel.windows/ia32 ./out/keep/gb-studio-${CIRCLE_BRANCH}-windows_x86-squirrel
- name: Build Win64
if: matrix.name == 'win64'
run: |
sudo dpkg --add-architecture i386
sudo apt-get -y update
sudo apt-get -y install wine wine64 mono-devel
yarn make:win
mkdir -p ./out/keep
mv ./out/make/zip/win32/x64/*.zip ./out/keep/gb-studio-${CIRCLE_BRANCH}-windows_x86_64.zip
mv ./out/make/squirrel.windows/x64 ./out/keep/gb-studio-${CIRCLE_BRANCH}-windows_x86_64-squirrel
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.label }} build
Expand Down

0 comments on commit e039d2e

Please sign in to comment.