Skip to content

Commit

Permalink
Building using a build matrix (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto authored Dec 8, 2024
1 parent 8f02a57 commit 55d24cb
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 35 deletions.
64 changes: 30 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,41 @@ env:
CARGO_TERM_COLOR: always

jobs:
build-linux:
runs-on: ubuntu-latest
build:
strategy:
matrix:
target:
- arch: x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
- arch: aarch64-apple-darwin
runs-on: macos-latest
- arch: x86_64-apple-darwin
runs-on: macos-latest
- arch: wasm32-wasip2
runs-on: macos-latest
skip-test: true
ext: .wasm
runs-on: ${{ matrix.target.runs-on }}
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Prepare target
run: rustup target add ${{ matrix.target.arch }}
- name: Build
run: cargo build --release --verbose
run: cargo build --target=${{ matrix.target.arch }} --release --verbose
- name: Run tests
run: cargo test --verbose
- name: Archive csaf-validator (linux amd64)
run: cargo test --target=${{ matrix.target.arch }} --verbose
if: ${{ matrix.target.skip-test != true }}
- name: Archive csaf-validator (${{ matrix.target.arch }})
uses: actions/upload-artifact@v4
with:
name: csaf-validator-linux-amd64
path: target/release/csaf-validator
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
- name: Archive csaf-validator (macos arm64)
uses: actions/upload-artifact@v4
with:
name: csaf-validator-macos-arm64
path: target/release/csaf-validator
name: csaf-validator-${{ matrix.target.arch }}
path: target/${{ matrix.target.arch }}/release/csaf-validator${{ matrix.target.ext }}
publish:
runs-on: ubuntu-latest
needs:
- build-macos
- build-linux
- build
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, 'beta') && !contains(github.ref, 'alpha')
steps:
- name: Determine Version
Expand All @@ -67,16 +67,12 @@ jobs:
echo "version=$VERSION" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
name: csaf-validator-linux-amd64
path: csaf-validator-linux-amd64
- uses: actions/download-artifact@v4
with:
name: csaf-validator-macos-arm64
path: csaf-validator-macos-arm64
path: csaf-validator
pattern: csaf-validator-*
- run: |
# just some magic to make the released files work with multiple platforms
mv csaf-validator-linux-amd64/csaf-validator csaf-validator-linux-amd64/csaf-validator-linux-amd64
mv csaf-validator-macos-arm64/csaf-validator csaf-validator-macos-arm64/csaf-validator-macos-arm64
# zip each folder
ls csaf-validator | xargs -I {} zip {}.zip -rj csaf-validator/{}
ls csaf-validator-*.zip
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
Expand All @@ -87,4 +83,4 @@ jobs:
prerelease: false
fail_on_unmatched_files: true
files: |
csaf-validator-*/csaf-validator-*
csaf-validator-*.zip
2 changes: 1 addition & 1 deletion csaf
Submodule csaf updated 46 files
+2 −13 csaf_2.0/test/validator/testcases_json_schema.json
+0 −2 csaf_2.1/json_schema/csaf_json_schema.json
+0 −4 csaf_2.1/prose/edit/etc/bind.txt
+123 −129 csaf_2.1/prose/edit/etc/example-global-to-local.json
+123 −128 csaf_2.1/prose/edit/etc/example-local-to-global.json
+0 −6 csaf_2.1/prose/edit/etc/section-display-to-label.json
+0 −6 csaf_2.1/prose/edit/etc/section-label-to-display.json
+5 −52 csaf_2.1/prose/edit/src/conformance.md
+1 −1 csaf_2.1/prose/edit/src/design-considerations-01-construction-principles.md
+0 −13 csaf_2.1/prose/edit/src/design-considerations-02-date-time.md
+4 −6 csaf_2.1/prose/edit/src/distributing.md
+2 −2 csaf_2.1/prose/edit/src/frontmatter.md
+0 −9 csaf_2.1/prose/edit/src/introduction-02-terminology-glossary.md
+0 −6 csaf_2.1/prose/edit/src/introduction-03-normative-references.md
+6 −0 csaf_2.1/prose/edit/src/introduction-04-informative-references.md
+0 −2 csaf_2.1/prose/edit/src/revision-history.md
+13 −14 csaf_2.1/prose/edit/src/schema-elements-01-defs-03-full-product-name.md
+2 −14 csaf_2.1/prose/edit/src/schema-elements-01-defs-11-version.md
+6 −44 csaf_2.1/prose/edit/src/schema-elements-02-props-04-vulnerabilities.md
+0 −38 csaf_2.1/prose/edit/src/tests-01-mndtr-35-contradicting-remediations.md
+0 −31 csaf_2.1/prose/edit/src/tests-01-mndtr-36-contradicting-product-status-remediation-combination.md
+20 −36 csaf_2.1/prose/edit/src/tests-02-optional.md
+182 −1,023 csaf_2.1/prose/share/csaf-v2.1-draft.html
+179 −603 csaf_2.1/prose/share/csaf-v2.1-draft.md
+0 −65 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-35-01.json
+0 −85 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-35-02.json
+0 −92 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-35-03.json
+0 −105 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-35-04.json
+0 −58 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-35-11.json
+0 −84 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-35-12.json
+0 −93 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-35-13.json
+0 −103 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-35-14.json
+0 −58 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-36-01.json
+0 −101 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-36-02.json
+0 −58 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-36-03.json
+0 −58 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-36-11.json
+0 −101 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-36-12.json
+0 −58 csaf_2.1/test/validator/data/mandatory/oasis_csaf_tc-csaf_2_1-2024-6-1-36-13.json
+30 −0 csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-10-01.json
+0 −58 csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-27-01.json
+0 −100 csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-27-02.json
+0 −58 csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-27-11.json
+0 −100 csaf_2.1/test/validator/data/optional/oasis_csaf_tc-csaf_2_1-2024-6-2-27-12.json
+11 −98 csaf_2.1/test/validator/data/testcases.json
+2 −13 csaf_2.1/test/validator/testcases_json_schema.json
+0 −69 meeting_minutes/2024/2024-07-31.md

0 comments on commit 55d24cb

Please sign in to comment.