Skip to content

Commit

Permalink
fix(ci,release): hack for broken arm64 builds, bump deno to 1.40.1, b…
Browse files Browse the repository at this point in the history
…ump to 0.3.3 (#565)

This provides a temporary fix for the broken build on arm64. The issue's
related to `wasm-opt` builds not being availaible for install by
ghjk/cargo-binstall. This PR uses `cargo install` directly instead when
in the dockerfile.

It also:
- bumps metatype version to 0.3.3 to ready the next release
- bumps the deno version to 1.40.1 (which comes with some changes)

#### Motivation and context

[Failure in CI
run.](https://github.com/metatypedev/metatype/actions/runs/7532055112/job/20501926599).

#### Migration notes

_No changes required_

### Checklist

- [x] The change come with new or modified tests
- [ ] Hard-to-understand functions have explanatory comments
- [ ] End-user documentation is updated to reflect the change
  • Loading branch information
Yohe-Am authored Jan 31, 2024
1 parent dcc6e18 commit 5af631f
Show file tree
Hide file tree
Showing 38 changed files with 1,220 additions and 1,119 deletions.
160 changes: 80 additions & 80 deletions .ghjk/lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -446,86 +446,6 @@
"moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/pnpm.ts"
}
},
{
"version": "1.0.53",
"port": {
"ty": "denoWorker@v1",
"name": "wasm_tools_cbinst",
"platforms": [
[
"linux",
"aarch64"
],
[
"linux",
"x86_64"
],
[
"darwin",
"aarch64"
],
[
"darwin",
"x86_64"
],
[
"windows",
"aarch64"
],
[
"windows",
"x86_64"
]
],
"version": "0.1.0",
"deps": [
{
"name": "cargo_binstall_ghrel"
}
],
"moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasm-tools.ts"
}
},
{
"version": "0.116.0",
"port": {
"ty": "denoWorker@v1",
"name": "wasm_opt_cbinst",
"platforms": [
[
"linux",
"aarch64"
],
[
"linux",
"x86_64"
],
[
"darwin",
"aarch64"
],
[
"darwin",
"x86_64"
],
[
"windows",
"aarch64"
],
[
"windows",
"x86_64"
]
],
"version": "0.1.0",
"deps": [
{
"name": "cargo_binstall_ghrel"
}
],
"moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasm-opt.ts"
}
},
{
"version": "1.33.0",
"port": {
Expand Down Expand Up @@ -898,6 +818,86 @@
"moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/node.ts"
}
},
{
"version": "0.116.0",
"port": {
"ty": "denoWorker@v1",
"name": "wasm_opt_cbinst",
"platforms": [
[
"linux",
"aarch64"
],
[
"linux",
"x86_64"
],
[
"darwin",
"aarch64"
],
[
"darwin",
"x86_64"
],
[
"windows",
"aarch64"
],
[
"windows",
"x86_64"
]
],
"version": "0.1.0",
"deps": [
{
"name": "cargo_binstall_ghrel"
}
],
"moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasm-opt.ts"
}
},
{
"version": "1.0.53",
"port": {
"ty": "denoWorker@v1",
"name": "wasm_tools_cbinst",
"platforms": [
[
"linux",
"aarch64"
],
[
"linux",
"x86_64"
],
[
"darwin",
"aarch64"
],
[
"darwin",
"x86_64"
],
[
"windows",
"aarch64"
],
[
"windows",
"x86_64"
]
],
"version": "0.1.0",
"deps": [
{
"name": "cargo_binstall_ghrel"
}
],
"moduleSpecifier": "https://raw.githubusercontent.com/metatypedev/ghjk/f380522/ports/wasm-tools.ts"
}
},
{
"version": "v2.4.0",
"port": {
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:

env:
GHJK_VERSION: "f380522"
DENO_VERSION: "1.39.0"
DENO_VERSION: "1.40.1"
REGISTRY_IMAGE: ghcr.io/${{ github.repository_owner }}/typegate

jobs:
Expand Down Expand Up @@ -104,6 +104,20 @@ jobs:
- run: |
# sometimes, dtolnay/rust-toolchain does not select the correct default target
rustup target add ${{ matrix.target }}
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: "--locked --release --package meta-cli --target ${{ matrix.target }} --features typegate"
- run: |
cd target/${{ matrix.target }}/release
tar czvf ../../../meta-cli-full-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz "meta${{ matrix.suffix }}"
- uses: svenstaro/upload-release-action@v2
with:
tag: ${{ steps.latest-tag.outputs.tag }}
file: "meta-cli-full-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
asset_name: "meta-cli-full-${{ steps.latest-tag.outputs.tag }}-${{ matrix.target }}.tar.gz"
overwrite: ${{ inputs.ovewriteArtifacts }}
- uses: actions-rs/cargo@v1
with:
use-cross: true
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

env:
GHJK_VERSION: "f380522"
DENO_VERSION: "1.39.0"
DENO_VERSION: "1.40.1"
RUST_BACKTRACE: "full"
RUST_LOG: "info,swc_ecma_codegen=off,tracing::span=off"

Expand Down Expand Up @@ -172,7 +172,15 @@ jobs:
test-docker:
needs: changes
if: ${{ needs.changes.outputs.typegate == 'true' }}
runs-on: ubuntu-latest
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
- platform: linux/arm64
runner: custom-macos
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
Expand All @@ -193,7 +201,7 @@ jobs:
if: steps.check.outputs.has-permission
with:
file: dev/Dockerfile
platforms: linux/amd64
platforms: ${{ matrix.platform }}
push: false
cache-from: type=registry,ref=docker.io/zifeo/metatype-cache:ci
cache-to: type=registry,ref=docker.io/zifeo/metatype-cache:ci,mode=max
Expand Down Expand Up @@ -280,6 +288,7 @@ jobs:
env:
WASM_FILE: target/debug/typegraph_core.wasm
run: |
echo pwd in $(pwd)
sudo apt update
sudo apt install -y --no-install-recommends gcc-multilib pkg-config libssl-dev libclang-dev perl make
Expand Down Expand Up @@ -320,7 +329,13 @@ jobs:
cargo build -p meta-cli
cargo build -p xtask # xtask and meta-cli are used by the test suite
deno run -A dev/test.ts --threads 1 -- --coverage=coverage
deno --unstable coverage ./coverage --lcov > coverage.lcov
# FIXME: required due to https://github.com/denoland/deno/issues/21621#issuecomment-1887870712
deno cache --import-map typegate/import_map.json \
typegate/src/main.ts \
typegate/tests/utils/*.ts \
dev/deps.ts \
dev/utils.ts
deno --unstable-worker-options --unstable-net coverage ./coverage --lcov > coverage.lcov
- uses: codecov/codecov-action@v3
with:
Expand Down
Loading

0 comments on commit 5af631f

Please sign in to comment.