Skip to content

Commit

Permalink
Update GitHub Actions deps
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed Dec 19, 2024
1 parent eb1fa97 commit d317062
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 17 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ on: push

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: >-
${{
(matrix.os == 'mac' && matrix.arch == 'arm64') &&
'macos-15' ||
(fromJson('{"linux":"ubuntu-22.04","mac":"macos-13","win":"windows-2022"}')[matrix.os])
}}
continue-on-error: false

strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-2022, macos-14]
os: [linux, mac, win]
arch: [x64]
include:
- os: ubuntu-22.04
- os: linux
arch: arm64
- os: macos-14
- os: mac
arch: arm64

steps:
- name: Install Linux Arm Toolchains
if: runner.os == 'linux' && matrix.arch == 'arm64'
run: sudo apt install -y binutils-aarch64-linux-gnu

- name: Use Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.11'

- name: Checkout
uses: actions/checkout@v3

Expand All @@ -44,25 +44,30 @@ jobs:
run: node scripts/test.js

- name: Upload
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4
with:
path: |
out/Release/gn_*.zip
name: gn-${{ matrix.os }}-${{ matrix.arch }}
path: out/Release/gn_*.zip
retention-days: 1

release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
permissions:
# Needed by action-gh-release.
contents: write

steps:
- name: Download Files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
merge-multiple: true

- name: Release
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2
with:
draft: true
name: build-gn ${{ github.ref_name }}
body: '## Changelog'
files: artifact/*.zip
files: '*.zip'
2 changes: 1 addition & 1 deletion scripts/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if (targetOs == 'linux') {
// Link with libc++ statically.
releaseConfig.push('use_custom_libcxx=true')
} else if (targetOs == 'mac') {
commonConfig.push('mac_sdk_min="10.12"')
commonConfig.push('mac_sdk_min="11"')
}

gen('out/Debug', debugConfig)
Expand Down
2 changes: 1 addition & 1 deletion scripts/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ process.env.PATH = `${binaries_dir}${path.delimiter}${process.env.PATH}`
const version = String(execSync('git describe --always --tags')).trim()

// Get target_cpu from args.gn.
let targetCpu = 'x64'
let targetCpu = process.arch
if (fs.existsSync('out/Release/args.gn')) {
const content = String(fs.readFileSync('out/Release/args.gn'))
const match = content.match(/target_cpu = "(.*)"/)
Expand Down

0 comments on commit d317062

Please sign in to comment.