Skip to content

Commit

Permalink
Merge pull request #4 from alexcrichton/new-release-process
Browse files Browse the repository at this point in the history
wip
  • Loading branch information
alexcrichton authored Feb 14, 2024
2 parents c985a6e + fa2409b commit 4b827f7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 91 deletions.
62 changes: 0 additions & 62 deletions .github/workflows/build.yml

This file was deleted.

10 changes: 7 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
build:
name: Build wasm-tools
Expand Down Expand Up @@ -80,15 +84,14 @@ jobs:
submodules: true
- name: Install Rust (rustup)
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
shell: bash
- run: cargo test --locked --all
- run: cargo test --locked -p wasmparser --benches
- run: cargo test --locked -p wasm-encoder --all-features
- run: cargo test -p wasm-smith --features wasmparser
- run: cargo build --manifest-path crates/wast/Cargo.toml --no-default-features
- run: cargo build --manifest-path crates/wast/Cargo.toml --no-default-features --features wasm-module
- run: cmake -S ${{github.workspace}}/examples -B ${{github.workspace}}/examples/build -DCMAKE_BUILD_TYPE=Release
- run: cmake --build ${{github.workspace}}/examples/build --config Release
- run: cmake -S examples -B examples/build -DCMAKE_BUILD_TYPE=Release
- run: cmake --build examples/build --config Release

wasm:
name: Test on WebAssembly
Expand Down Expand Up @@ -189,6 +192,7 @@ jobs:
- doc
- build
if: always()

steps:
- name: Successful test and build
if: ${{ !(contains(needs.*.result, 'failure')) }}
Expand Down
26 changes: 4 additions & 22 deletions .github/workflows/release-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
workflow_dispatch:
inputs:
action:
description: 'Publish script argument: "release-major", or "release-patch"'
description: 'Publish script argument: "release-major", or "release-minor"'
required: false
default: 'release-major'

Expand Down Expand Up @@ -83,24 +83,6 @@ jobs:
EOF
- name: Make a PR
# Note that the syntax here is kinda funky, and the general gist is that
# I couldn't figure out a good way to have a multiline string-literal
# become a json-encoded string literal to send to GitHub. This
# represents my best attempt.
run: |
set -ex
body=$(jq -sR < ./pr-body)
curl --include --request POST \
https://api.github.com/repos/${{ github.repository }}/pulls \
--header "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
--data @- << EOF
{
"head": "$PR_HEAD",
"base": "$PR_BASE",
"title": "$PR_TITLE",
"body": $body,
"maintainer_can_modify": true
}
EOF
run: gh pr create -B "$PR_BASE" -H "$PR_HEAD" --title "$(cat ./pr-body)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 6 additions & 2 deletions crates/wit-parser/src/resolve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,12 @@ impl Resolve {
if !path.exists() {
return Ok(ret);
}
for dep in path.read_dir().context("failed to read directory")? {
let dep = dep.context("failed to read directory iterator")?;
let mut entries = path
.read_dir()
.and_then(|i| i.collect::<std::io::Result<Vec<_>>>())
.context("failed to read directory")?;
entries.sort_by_key(|e| e.file_name());
for dep in entries {
let path = dep.path();

let pkg = if dep.file_type()?.is_dir() {
Expand Down
2 changes: 1 addition & 1 deletion tests/cli/semver-check-add-export.wit.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: new world is not semver-compatible with the previous world

Caused by:
0: type mismatch for import `new`
missing export named `a` (at offset 0xff)
missing export named `a` (at offset 0x101)
2 changes: 1 addition & 1 deletion tests/cli/semver-check-remove-import.wit.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ error: new world is not semver-compatible with the previous world

Caused by:
0: type mismatch for import `new`
missing import named `a` (at offset 0x128)
missing import named `a` (at offset 0x12a)

0 comments on commit 4b827f7

Please sign in to comment.