Skip to content

Commit

Permalink
Merge branch 'release/sameold-0.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
cbs228 committed Feb 24, 2024
2 parents b970e93 + a11a0d2 commit 4396489
Show file tree
Hide file tree
Showing 32 changed files with 2,204 additions and 1,300 deletions.
51 changes: 19 additions & 32 deletions .github/workflows/rust_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Release

on:
push:
branches: [ "release/**", "develop" ]
branches: [ "release/**", "develop", "staging/**" ]
tags: [ "samedec-*" ]

permissions:
Expand Down Expand Up @@ -60,11 +60,15 @@ jobs:

needs: vendor_sources

# qemu cross-compiling is very slow
timeout-minutes: 60

env:
# See <https://hub.docker.com/_/rust> for list of tags
BUILD_RUST_TAG: 1.67.0
BUILD_RUST_TAG: 1.70.0
BUILD_OS_GNU: slim-buster
BUILD_OS_MUSL: alpine
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

strategy:
matrix:
Expand Down Expand Up @@ -102,19 +106,18 @@ jobs:
enableCrossOsArchive: true
fail-on-cache-miss: true

- name: Workaround for https://github.com/rust-lang/cargo/issues/8719
run: |
sudo mkdir -p /var/lib/docker
sudo mount -t tmpfs -o size=10G none /var/lib/docker
sudo systemctl restart docker
- name: Set swap space
uses: pierotofy/[email protected]
with:
swap-size-gb: 10

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Prepare output directory
run: |
Expand All @@ -126,7 +129,7 @@ jobs:
# install/bin/samedec-x86_64-unknown-linux-gnu
# and the like.
- name: Build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
push: false
Expand Down Expand Up @@ -227,17 +230,9 @@ jobs:
- name: Run integration tests
shell: bash
run: |
set -e;
"$samedec_exe" --version
for file in $(basename -s .bin sample/*.s16le.bin); do
printf '[%s]\n' "$file";
"$samedec_exe" -r 22050 <"sample/$file.bin" | tee result;
cmp result "sample/$file.txt" || {
echo "FAIL!";
exit 1;
};
echo "PASS";
done
pushd sample &&
./test.sh &&
popd
- name: Copy artifact
shell: bash
Expand Down Expand Up @@ -313,17 +308,9 @@ jobs:
- name: Run integration tests
run: |
set -e;
"$samedec_exe" --version
for file in $(basename -s .bin sample/*.s16le.bin); do
printf '[%s]\n' "$file";
"$samedec_exe" -r 22050 <"sample/$file.bin" | tee result;
cmp result "sample/$file.txt" || {
echo "FAIL!";
exit 1;
};
echo "PASS";
done
pushd sample &&
./test.sh &&
popd
- name: Copy artifact
run: |
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/rust_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,14 @@ jobs:
enableCrossOsArchive: true
fail-on-cache-miss: true

- name: Build and test samedec
- name: Build and unit-test samedec
shell: bash
run: |
cargo test --frozen -p samedec --verbose
- name: Run integration tests
shell: bash
run: |
set -e;
for file in $(basename -s .bin sample/*.s16le.bin); do
printf '[%s]\n' "$file";
cargo run -p samedec -- -r 22050 <"sample/$file.bin" | tee result;
cmp result "sample/$file.txt" || {
echo "FAIL!";
exit 1;
};
echo "PASS";
done
pushd sample
./test.sh
popd
Loading

0 comments on commit 4396489

Please sign in to comment.